Search Unity

Aperture Cutscene Editor [RELEASED]

Discussion in 'Assets and Asset Store' started by CorruptScanline, Feb 14, 2012.

  1. CorruptScanline

    CorruptScanline

    Joined:
    Mar 26, 2009
    Posts:
    217


    Available now on the Asset Store for $40


    There is already a thread in the Showcase section but since its released now I guess I should make one here.

    Aperture Cutscene Editor is a cutscene editor for Unity. It allows you to easily setup curve based animations for cameras, materials, characters, or anything else you want to animate. Aperture Cutscene Editor also has a powerful event system for triggering events, such as spawning/destroying an object, setting object velocity, or anything else you may need happen. See your animation in edit mode with the Play Preview button for quick revisions. Aperture Cutscene Editor can also be used to setup scripted gameplay event chains by designers and non-programmers.

    You can easily create extension Actions and Events to conform to your projects needs, and the entire editor is open source if you really need some low level access :).

    Update:
    Version 1.11 is now on the Asset Store.
    Changes:
    Compiled dll for core classes.
    Fixed build errors on mobile build target.
    Added ability to reorder curve clips.
    Added per curve clip animation override for PlayAnimation action.


    Some of the features:
    • Intuitive Interface.
    • Extremely powerful.
    • Animate any number or vector variable on any script/component on an object.
    • Trigger almost any function with custom parameters using Events.
    • Easily extendable.
    • Open source!
    • Editor play preview button.
    • Easily create animations with Curve Tracks.
    • Trigger functions with Events.
    • Trigger cutscenes from within other cutscenes.
    • Cutscenes can be anything from traditional camera and object animation to scripted gameplay events to invisible event chain triggering for non-programmers.
    • 3 types of Curve Track update modes, Action, Direct Variable Access, and Custom Expression.
    • Easily add custom Actions and Events with a little programming.

    If you have any suggestions of the types of video tutorials you would like to see I would love to hear them. Right now Im thinking of a basic interface overview, a simple cinematic cutscene, and a more complex gameplay oriented tutorial covering advanced animations and Events.

    Get more info at www.ApertureCutscene.com

    Here an overview of the main interface:




    And here are some screenshots:





    Here is a tutorial explaining the interface and features while creating a simple cutscene:


    Here is a test cutscene I made. Its pretty old but shows some of the things you can do. All animation was done with the editor.



    www.ApertureCutscene.com
     
    Last edited: Mar 1, 2012
  2. nukeD

    nukeD

    Joined:
    Feb 12, 2009
    Posts:
    411
    I missed the other thread somehow, sounds very cool! does it play well with Playmaker? if so, consider it sold!
     
  3. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    Oh yes,
    if we can use this with playmaker will be good and also i want to know if i can use it with ios in good performance too.
     
  4. CorruptScanline

    CorruptScanline

    Joined:
    Mar 26, 2009
    Posts:
    217
    What kind of interaction with Playmaker are you looking for? Im working on a video showing interaction with uscript including how to run a uscript state machine from in a cutscene and how to play a cutscene from a uscript state machine. Doing the same with Playmaker should be similar though. In the mean time I have uploaded a video showing how to create a very basic cutscene (the opening door one from the examples) and it explains the basics of the editor.

     
  5. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    The cutscene editor is looking fine.
    What about ios? Do you see if there are any performance problems besides the known graphics limitations for it?
     
  6. CorruptScanline

    CorruptScanline

    Joined:
    Mar 26, 2009
    Posts:
    217
    If you are importing into Unity 3.5 you may get this error:

    Code (csharp):
    1. Assets/ApertureCutsceneEditor/Components/Events/Event_Expression.js(6,7): BCE0172: `UnityScript.Scripting.IEvaluationDomainProvider' interface member implementation must be public or explicit.
    For now to fix this you should just delete this file and everything should be fine:
    Assets/ApertureCutsceneEditor/Components/Events/Event_Expression.js

    I have already uploaded a new version to the Asset Store but it hasnt been accepted yet. It fixes this problem as well as moving ApertureCutsceneEditor folder into Assets/Plugins folder which should make it interact better with other tools.

    EDIT:
    MStolley: I haven't tested in IOS yet but it should work. The file shown above that causes problems in 3.5 would also cause problems with IOS but it has been removed from the next version so that wont be a problem anymore. The rest of it should be IOS/Android compliant though.

    Flash builds don't work yet though, and I'm pretty sure there is nothing that can be done about that until the flash compiler fixes some bugs with reflection.
     
    Last edited: Feb 16, 2012
  7. Quickfingers

    Quickfingers

    Joined:
    Aug 29, 2009
    Posts:
    268
    Awesome work, didn't take me long to build my first cutscene. Great to finally have all this control with live feedback on edits.
    A serious request though, it seems to be lacking any and all Undo functionality. Is this something you plan on adding in the future?
     
  8. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,526
    Can I use this as a scripted camera controller for a third person game? as a camera that follows a path and keeps looking at the player while moving / zooming at certain events or places along the path?
     
  9. CorruptScanline

    CorruptScanline

    Joined:
    Mar 26, 2009
    Posts:
    217
    quickfingers: I havent really looked into how undo works in Unity but I will look into it.

    Lars Steenhoff: Do you mean something like the original Resident Evil games and the adventure games by Telltale Games (Sam and Max, Back To The Future). If so then you can definitely do that kind of camera stuff for gameplay.

    Currently I think you would need to use a visual scripting tool or regular scripting to do something more than triggering cutscenes when the player walks into a trigger, although you could trigger a cutscene that would use an event to change a cameras Follow Curve component to use a new curve and target. You can also add curve and target overrides when using a Follow Curve component with a curve clip, but the override will only be applied while the current time is over the curve clip. Also remember that curve points can be animated which could be used to do some interesting things.
     
  10. MaDDoX

    MaDDoX

    Joined:
    Nov 10, 2009
    Posts:
    764
    Looks awesome Kurt, great and much needed tool. Congratulations and good luck with your sales! :)
     
  11. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    This is very cool. I would love to try this. Do you have a free version or something I could look at, because I really hate creating scripted sequences in code.
     
  12. unisip

    unisip

    Joined:
    Sep 15, 2010
    Posts:
    340
    Hi Kurt,

    Awesome job you did here :)

    I'm trying to get it to work with the rest of my code, which is c#.
    I placed your code under StandardAssets folder, as required, but as soon as i do that i get a compilation error:

    Assets/Standard Assets/ApertureCutsceneEditor/Components/Events/Event_Expression.js(6,7): BCE0172: `UnityScript.Scripting.IEvaluationDomainProvider' interface member implementation must be public or explicit.

    Any idea how to fix this?
     
  13. unisip

    unisip

    Joined:
    Sep 15, 2010
    Posts:
    340

    (after more tests, I found another issue, that I'm not sure can be solved: I saved a cutscene to assetbundle, in order to load it dynamically and have it play using my C# code. However, it seems that I can't access the JS components when they are coming from an assetbundle, while it is possible if they are in the scene at start. Oh well, this looks like I'm going to have to port the whole thing to C#... Unless someone else sees a solution... God I hate javascript :)
     
  14. CorruptScanline

    CorruptScanline

    Joined:
    Mar 26, 2009
    Posts:
    217
    That Event_Expression.js file should just be deleted. After moving everything into Plugins or StandardAssets folder there may be another error in ApertureCutsceneEditor/Components/Actions/Editor/Action_FollowCurve_Editor.js at this line:
    @CustomEditor(Action_FollowCurve)

    Just comment out or delete this line and it should work fine.

    These things have already been fixed in the new and still unaccepted version on the asset store.
     
  15. sipon

    sipon

    Joined:
    Feb 8, 2009
    Posts:
    143
    Hi Kurt !

    Playing with your tool since a few hours and really like it :)
    Can't wait to see your next videos !
    Can you please quick explain how to trigger cutscenes from within other cutscenes ?

    A little thing is annoying when you want to adjust the start time of a clip :
    - can't we drag the first key of a clip as the last one ? (instead of moving the full clip to adjust start time, then moving back the last key to original time )
     
  16. CorruptScanline

    CorruptScanline

    Joined:
    Mar 26, 2009
    Posts:
    217
    To trigger a cutscene from another cutscene you would create an event and set the other cutscenes gameobject as the target and then use the Cutscenes Play function in the event.

    I will put first key dragging on the list of things to do.

    I also just realized that the best way to avoid compilation order errors is to compile a dll so I will do that in the next version, although I will still include the source in a zip file or something.
     
  17. sipon

    sipon

    Joined:
    Feb 8, 2009
    Posts:
    143
    tks !
     
  18. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,526

    Yes among these games and especially like Ico and Shadow of the Colossus, where the player can control the camera but there is also a camera script that decides how far the camera is from the player.
     
  19. Quickfingers

    Quickfingers

    Joined:
    Aug 29, 2009
    Posts:
    268
    +1 for the compiled dll! if I can add this to a VS solution then I imagine I can still get intellisense for your classes. As it stands with Javascript that isn't possible. Thanks again for the great tool Kurt. About the Undo stuff, Unity has some pretty substantial undo functionality that you should be able to integreate easily enough :)
     
  20. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    I purchased this today, good stuff :)

    It wasn't too hard to make a PlayMaker action to trigger cutscenes, including whether to loop and option to play it backwards. I'll post more about this on Saturday.

    I would find it very useful if you could add a 'speed' float to the main cutscene script which would enable the playback rate of the cutscene to be adjusted very easily (e.g. 0.5 to play at half speed, 2.0 to play twice as fast etc). I had a quick go at adding this myself and managed to get it working ok when cutscene is playing forwards, but I broke Rewind as Im tired and got a little confused by how you are keeping track of timing.

    On a related note, how hard would it be to add a script float variable that enables the cutscene playback position to be manually scrubbed in play mode, similar to the timeline scrubbing you have in the editor window? Im not sure if Id want this variable to match the time in seconds or whether Id prefer it be be normalised to a 0.0-1.0 range.
     
  21. CorruptScanline

    CorruptScanline

    Joined:
    Mar 26, 2009
    Posts:
    217
    Version 1.1 is now on the Asset Store. It fixes some problems with Unity 3.5 and has better compatibility with other tools.

    elbows: Those are good ideas, and should be fast to implement.
     
  22. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Thats great to hear, thanks :)

    This product is very useful to me as I use Unity to do realtime visuals, and there are a few things I find annoying about the GUI of Unitys built-in animation system. The timeline scrubbing request is so that I can use a midi controller, iPad or kinect skeletal tracking to scrub backwards and forwards in time over cutscenes :)
     
  23. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    The ability to duplicate a curve track within a cutscene would be rather handy in several ways. I was also going to request the ability to have more than one curve on a track, but I guess that could involve a lot of work, and if I can just quickly duplicate a track then I can get equivalent functionality anyway.
     
  24. sipon

    sipon

    Joined:
    Feb 8, 2009
    Posts:
    143
    I've got several cutscene sharing one object with several animations.
    How can i specify which anim i want to play ?

    there's only one slot in the Action_PlayAnimation script and i don't see anything regarding animation selection on the curve clip inspector.
     
  25. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Here is a quick stab at a PlayMaker Action for playing cutscenes. My methods for detecting when the cutscene has finished may be a bit of a fudge but it seems to work for most scenarios. I haven't created a separate Playmaker Action for stopping the cutscene yet but as you can see from the end of my code this should be very easy indeed.

    Make sure that Aperture Cutscene Editor files are in a location such as plugins, then create a cs script file called PlayApertureCutscene.cs in the main Playmaker Actions folder and put the following code into the file:

    Code (csharp):
    1. using System;
    2. using UnityEngine;
    3.  
    4. namespace HutongGames.PlayMaker.Actions
    5. {
    6.     [ActionCategory(ActionCategory.Animation)]
    7.     [Tooltip("Plays an Aperture Cutscene on a Game Object.")]
    8.     public class PlayApertureCutscene : FsmStateAction
    9.     {
    10.         [RequiredField]
    11.         [CheckForComponent(typeof(Cutscene))]
    12.         [Tooltip("Game Object which has a cutscene.")]
    13.         public FsmOwnerDefault gameObject;
    14.        
    15.         [Tooltip("Event to send when the cutscene has finished playing. NOTE: Not sent with Loop mode!")]
    16.         public FsmEvent finishEvent;
    17.  
    18.         [Tooltip("Event to send when the cutscene loops. If you want to send this event to another FSM use Set Event Target. NOTE: This event is only sent with Loop mode.")]
    19.         public FsmEvent loopEvent;
    20.  
    21.         [Tooltip("Stop playing the cutscene when this state is exited.")]
    22.         public bool stopOnExit;
    23.        
    24.         [Tooltip("Loop the cutscene.")]
    25.         public bool loopCutscene;
    26.        
    27.         [Tooltip("Play the cutscene in reverse. Only works if the cutscene has already been played forwards by some amount.")]
    28.         public bool reverseCutscene;
    29.        
    30.         public override void Reset()
    31.         {
    32.             gameObject = null;
    33.             finishEvent = null;
    34.             loopEvent = null;
    35.             stopOnExit = false;
    36.             loopCutscene = false;
    37.             reverseCutscene = false;
    38.         }
    39.  
    40.         public override void OnEnter()
    41.         {
    42.             DoPlayCutscene();
    43.         }
    44.  
    45.         void DoPlayCutscene()
    46.         {
    47.             var go = Fsm.GetOwnerDefaultTarget(gameObject);
    48.             if (go == null)
    49.             {
    50.                 Finish();
    51.                 return;
    52.             }
    53.             Cutscene thecutscene = go.GetComponent<Cutscene>();
    54.             if (thecutscene == null)
    55.             {
    56.                 LogWarning("Missing cutscene component!");
    57.                 Finish();
    58.                 return;
    59.             }
    60.             if (loopCutscene)
    61.             {
    62.                 thecutscene.loop = true;
    63.             }
    64.             else
    65.             {  
    66.                 thecutscene.loop = false;
    67.             }
    68.             if (reverseCutscene)
    69.             {
    70.                 thecutscene.Rewind();
    71.             }
    72.             else
    73.             {  
    74.                 thecutscene.Play();
    75.             }
    76.            
    77.            
    78.         }
    79.  
    80.         public override void OnUpdate()
    81.         {
    82.             var go = Fsm.GetOwnerDefaultTarget(gameObject);
    83.             if (go == null)
    84.             {
    85.                 return;
    86.             }
    87.             Cutscene thecutscene = go.GetComponent<Cutscene>();
    88.            
    89.             if (thecutscene == null)
    90.             {
    91.                 LogWarning("Missing cutscene component!");
    92.                 Finish();
    93.                 return;
    94.             }
    95.            
    96.             if (!thecutscene.playing  !reverseCutscene)
    97.             {
    98.                 Fsm.Event(finishEvent);
    99.                 Finish();
    100.             }
    101.            
    102.             if (reverseCutscene  (thecutscene.totalPlays == 0))
    103.             {
    104.                 Fsm.Event(finishEvent);
    105.                 Finish();
    106.             }
    107.             if (loopCutscene  (thecutscene.totalPlays > 1))
    108.             {
    109.                 Fsm.Event(loopEvent);
    110.             }
    111.         }
    112.  
    113.         public override void OnExit()
    114.         {
    115.             if (stopOnExit)
    116.             {
    117.                 StopCutscene();
    118.             }
    119.         }
    120.  
    121.         void StopCutscene()
    122.         {
    123.             var go = Fsm.GetOwnerDefaultTarget(gameObject);
    124.             if (go != null)
    125.             {  
    126.                 Cutscene thecutscene = go.GetComponent<Cutscene>();
    127.                 if (thecutscene !=null)
    128.                 {
    129.                     thecutscene.Stop();
    130.                 }
    131.             }
    132.         }
    133.     }
    134. }
    Example usage scenarios and settings:

    Attach the Play Aperture Cutscene Action (found in the Animation section of Action browser) to a PlayMaker State.
    Specify the game object that the cutscene is attached to if its a different game object to the one the playmaker FSM is on.

    Then either:

    1) Play the cutscene forwards once.
    Leave all options unchecked.

    2) Play the cutscene forwards once but stop if the FSM state changes:
    Tick Stop On Exit

    3) Repeatedly play the cutscene forwards:
    Tick the loop option.

    4) Repeatedly play the cutscene forwards but stop if the FSM state changes:
    Tick Stop On Exit
    Tick the loop option.

    5) Play once then transition to another state.
    Set a Finish Event
    Create a transition for the Finish Event
    Create another state and link the Finish Event transition to it

    6) Repeatedly play forwards but transition to another state once a loop has occurred:
    Tick loop option
    Set a Loop Event
    Create a transition for the Loop Event
    Create another state and link the Loop Event transition to it

    7) Pingpong the cutscene forwards then backwards repeatedly:
    Leave the options unchecked.
    Set a Finish Event
    Create a transition for the Finish Event
    Create another state and link the Finish Event transition to it
    Attach the Play Aperture Cutscene Action to this 2nd state
    Select the Reverse Cutscene option in the action on the 2nd state.
    Set a Finish Event for the action on the 2nd state.
    Create a transition for the Finish Event on the 2nd state that points back to the 1st state.

    etc.
     
    Last edited: Feb 18, 2012
  26. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,657
    elbows: Cool Playmaker action! You should post it on the Playmaker Forums too... :)
     
  27. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Thanks. I posted it to your forum now :)
     
  28. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Another little feature request: The ability to loop the preview playback thats available in edit mode.
     
  29. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Had errors when trying to build a project that included Aperture Cutscene Editor. It looks like you need to add some #if UNITY_EDITOR stuff to some files:

    CutsceneActionEditor.js
    Action_FollowCurve_Editor.js
    CutsceneEditor.js
     
  30. CorruptScanline

    CorruptScanline

    Joined:
    Mar 26, 2009
    Posts:
    217
    elbows, this is very strange. Those files are in Editor folders so they shouldnt be compiled at all... It looks like its because those files are in Plugins folder which is overriding the fact that they are in Editor folders so they try to get compiled normally.

    And thanks for the PlayMaker action!
     
    Last edited: Feb 19, 2012
  31. CorruptScanline

    CorruptScanline

    Joined:
    Mar 26, 2009
    Posts:
    217
    I have created a hotfix script that will add the "#if UNITY_EDITOR" compiler commands to avoid the build errors.

    Download and import the unitypackage into your project and run it with the new command menu item.
    Download 1.1 HotFix
     
  32. CorruptScanline

    CorruptScanline

    Joined:
    Mar 26, 2009
    Posts:
    217
    Yeah I guess I forgot to add that functionality. I have modified the action to have an override animation that you can set in the curve clip inspector. You can download the updated action here:
    http://www.keenleveldesign.com/aperture/files/hotfix/Aperture_1.1_PlayAnimationUpdate.zip
     
  33. sipon

    sipon

    Joined:
    Feb 8, 2009
    Posts:
    143
    Thank you so much for quick response Kurt !

    could be great to have this also :

     
  34. unisip

    unisip

    Joined:
    Sep 15, 2010
    Posts:
    340
    Hey, i've been working with sipon, setting up some fairly complex cutscenes, including image effects fields animation, camera movement and all that. I'm guessing his next request, beyond checkboxes, is going to be grouping of tracks, with a fold/unfold button for each group. That would help workflow on cutscenes with loads of tracks (sorry, i tried to stop him from having 20 tracks per cutscene, but he won't listen... He's just gone totally crazy since aperture came out ;)
     
  35. unisip

    unisip

    Joined:
    Sep 15, 2010
    Posts:
    340
    One thing that would be useful would be a public function to set the scene at a given time position in a given cutscene WITHOUT ACTIVATING CAMERAS. I'm usig cutscnes to create a sleep mode in an app. It basically stzarts a given cutscene, which then plays a set of cutscenes in loop using events at the end of each.
    When quitting the sleepmode, i just stop all cutscenes and then force a given fram using this:
    var c:Cutscene = Cutscene.Find(cutscene);
    c.UpdateCutscene(time, false, false);
    c.UpdateCutscene(time, false, true);

    but then i have to hack a little to deactivate cameras that have been activated:
    var cutscenes : Cutscene[] = FindObjectsOfType(Cutscene) as Cutscene[];
    for (var c : Cutscene in cutscenes)
    c.Stop();

    A simpler method would help
     
    Last edited: Feb 20, 2012
  36. unisip

    unisip

    Joined:
    Sep 15, 2010
    Posts:
    340
    ouch! Aperture doesn't compile on ios :(

    I took a quick look an it seems to be mostly because of dynamic typing.
    Kurt, I strongly suggest that you switch to static typing, using #pragma strict in each js file.
    You don't need unity iphone to fix this. Errors should pop up as soon as you have pragma strict in your files.

    a quick ref to the documentation about this:

    Statically Typed JavaScript

    Dynamic typing in JavaScript is always turned off in Unity when targetting iOS (this is equivalent to #pragma strict getting added to all your scripts automatically). Static typing greatly improves performance, which is especially important on iOS devices. When you switch an existing Unity project to the iOS target, you will get compiler errors if you are using dynamic typing. You can easily fix these either by using explicitly declared types for the variables that are causing errors or taking advantage of type inference.

    http://unity3d.com/support/documentation/Manual/iphone-GettingStarted.html
     
  37. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,526
    I really would like this to work on iOS, in fact this is the main reason for buying it. ( I wish unity would state on the asset store a compatibility list for all the assets.) I'm pretty hopeful that the Aperture Cutscene editor will work on iOS soon.
     
  38. CorruptScanline

    CorruptScanline

    Joined:
    Mar 26, 2009
    Posts:
    217
    unisip: Im pretty sure I have #pragma strict in all files. Although when I went to compile a dll there were some errors that I think were caused by dynamic typing (and for some reason didnt get caught when the files were automatically compiled).

    What happens when you try to build on IOS? I just tried it and I dont get any build errors in Unity. My apple dev account is inactive so I cant actually build the xcode project right now. Are the errors in Unity when making the build, or in xcode? Hopefully the changes I have already made fixed the problem and will be available in the next version.
     
    Last edited: Feb 21, 2012
  39. Quickfingers

    Quickfingers

    Joined:
    Aug 29, 2009
    Posts:
    268
    iOS build working here with Aperture created cutscenes, running on my phone as we speak.
     
  40. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,526
    Good to hear the iOS is working!
     
  41. unisip

    unisip

    Joined:
    Sep 15, 2010
    Posts:
    340
    that's pretty odd... I get errors anytime there is something like for (i = 0;...), it says undefined variable i (happens a lot in API Access js)
    I'll try again and see if i can find another reason
     
  42. unisip

    unisip

    Joined:
    Sep 15, 2010
    Posts:
    340
    Mmm ok I figured it out :)
    Silly as hell :)

    Right now you're distributing all your scripts in Plugins/ApertureCutsceneEditor, including the Editor-only scripts. This causes compilation errors when switching to IOS, because it seems it is also trying to compile your editor scripts to IOS.

    I suggest you make two folders:

    Plugins/ApertureCutsceneEditor
    Editor/ApertureCutsceneEditor

    That should solve the problem.
     
  43. CorruptScanline

    CorruptScanline

    Joined:
    Mar 26, 2009
    Posts:
    217
    Yep thats already fixed if you run the hotfix that I posted earlier.
     
  44. unisip

    unisip

    Joined:
    Sep 15, 2010
    Posts:
    340
    Actually, it wasn't really fixed by your hotfix.
    All your hotfix does is help compiling it to IOS using the #if UNITY_EDITOR.
    That's good, but it still won't compile in the editor when the platform is set to IOS.
    Wouldn't be better to have it work in both editor and runtime?
    Moving your editor scripts to an editor folder would solve this
     
  45. CorruptScanline

    CorruptScanline

    Joined:
    Mar 26, 2009
    Posts:
    217
    Are you sure? I would think UNITY_EDITOR would be defined any time the script is being compiled within the editor for editor use and not defined when building game builds for any platform, essentially doing the same thing as having them in an Editor folder.
     
  46. unisip

    unisip

    Joined:
    Sep 15, 2010
    Posts:
    340
    Well, from what I could witness on my mac, I would still get all those compilation errors as long as the editor scripts remained inside the Plugins folder.

    However, with your ifdef UNITY_EDITOR, I could build an app for IOS (since that code is being left out at runtime).

    But if you try to hit play in the editor, it will compile all that code (as UNITY_EDITOR=true) and spit out errors.

    Can anyone else confirm that they have the same issue with target set to ios in the editor?
     
  47. TouchSoft

    TouchSoft

    Joined:
    Oct 18, 2008
    Posts:
    218
    I purchased this editor and I can't even get it to run inside of unity. I'm on a Mac and targeting iOS. Attached is a screenshot of the errors I'm getting... over 400 errors.
     

    Attached Files:

  48. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    "for (i = 0" should be "for (var i = 0". All JS scripts should have "#pragma strict" at the top, so things like this are caught.

    --Eric
     
  49. TouchSoft

    TouchSoft

    Joined:
    Oct 18, 2008
    Posts:
    218
    So the only way I can fix this is if I go through all the files and add #pragma strict ?? ... or do I change all the for statements?

    ugh.. this is frustrating. Can the developer please fix this?
     
  50. CorruptScanline

    CorruptScanline

    Joined:
    Mar 26, 2009
    Posts:
    217
    TouchSoft, I thought I fixed this with the 1.1 hotfix in the first post, but it seems that Unity iphone builder doesnt care about "#if UNITY_EDITOR" for some reason. The quick fix right now is just to move these files into "Assets/Editor" folder:

    Assets/Plugins/ApertureCutsceneEditor/CutScene/Editor/APIAccess/APIAccess.js
    Assets/Plugins/ApertureCutsceneEditor/CutScene/Editor/CutsceneEditor.js
    Assets/Plugins/ApertureCutsceneEditor/Components/Actions/Editor/Action_FollowCurve_Editor.js
    Assets/Plugins/ApertureCutsceneEditor/Components/Actions/Editor/CutsceneActionEditor.js


    Of course this will be fixed in the next version but afaik the Asset Store submission is still down.