Search Unity

Aperture Cutscene Editor [RELEASED]

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

  1. TwisterK

    TwisterK

    Joined:
    Oct 26, 2010
    Posts:
    110
    Thanks for the reply. I've tried it, but it still rewind all the way to the start and play the cutscene. This is my script, am I missing something here?

    Code (csharp):
    1.  
    2.  
    3.  
    4. function Start ()
    5. {
    6.     var cutScene : Cutscene = Cutscene.Find ( "Cutscene0" );
    7.     cutScene.Play();
    8.    
    9.     yield WaitForSeconds ( 1f );
    10.    
    11.     cutScene.Stop();
    12.    
    13.     yield WaitForSeconds ( 2f );
    14.    
    15.     cutScene.Play ();
    16.  
    17. }
    18.  
     
  2. CorruptScanline

    CorruptScanline

    Joined:
    Mar 26, 2009
    Posts:
    217
    Hmm ok it looks like there is a bug with that. You can work around it by manually setting the "startTime" field on the cutscene after calling Play(). Like this:

    Code (csharp):
    1.  
    2. public class Tester:MonoBehaviour {
    3.     public Cutscene cutscene;
    4.     public float pausedTime = 0;
    5.    
    6.     IEnumerator Start () {
    7.         cutscene.Play();
    8.         yield return new WaitForSeconds(2.5f);
    9.         PauseCutscene(cutscene);
    10.         yield return new WaitForSeconds(1.0f);
    11.         ResumeCutscene(cutscene);
    12.     }
    13.    
    14.     public void PauseCutscene(Cutscene cs) {
    15.         pausedTime = Time.timeSinceLevelLoad-cs.startTime;
    16.         pausedTime = Mathf.Max(0.0f,Mathf.Min(pausedTime,cs.GetTotalTime()));
    17.         cs.Stop();
    18.     }
    19.    
    20.     public void ResumeCutscene(Cutscene cs) {
    21.         cs.Play();
    22.         cs.startTime = Time.timeSinceLevelLoad-pausedTime;
    23.        
    24.         //Add completed events so they dont get called again.
    25.         for (int i = 0; i < cs.events.Length; i++) {
    26.             if (cs.events[i].startTime < pausedTime) {
    27.                 cs.finishedEvents.Add(cs.events[i]);
    28.             }
    29.         }
    30.     }
    31. }
    32.  
    EDIT:
    updated the example to handle events properly.
     
    Last edited: Nov 29, 2012
  3. TechnicalArtist

    TechnicalArtist

    Joined:
    Jul 9, 2012
    Posts:
    736
  4. TwisterK

    TwisterK

    Joined:
    Oct 26, 2010
    Posts:
    110
    It working now! Thanks for the help :D

    --TwisterK
     
  5. Zozo2099

    Zozo2099

    Joined:
    Jul 15, 2012
    Posts:
    478
    Hi can I know please if it is compatible with Unity 4? Thanks.
     
  6. CorruptScanline

    CorruptScanline

    Joined:
    Mar 26, 2009
    Posts:
    217
    Yes its compatible with Unity 4. Theres a deprecated api warning in one of the event scripts though.
     
  7. Cazual

    Cazual

    Joined:
    Dec 27, 2012
    Posts:
    21
    Is there a build in way to exit from a playing custscene, ie. When you are using the cutscene a intro to a game and want the user to be able to cut it short if they have allready seen it and just want to get to the game?

    Or should we just write a script to do that?
     
  8. Joe ByDesign

    Joe ByDesign

    Joined:
    Oct 13, 2005
    Posts:
    841
    Hi Kurt,

    We're using Aperture extensively on a project, and noticed 1 cutscene has an object shaking that doesn't exist in the object's movement curve (using Action_FollowCurve).

    Have isolated the shaking to the Auto Look Direction flag; disabling removes the shake, but of course, then the object doesn't follow the curve's direction...

    Object has several children, including some Rigidbodies, but all are flagged as isKinematic.

    Do you know what causes this shaking / how to fix?
     
  9. Koala_Dude

    Koala_Dude

    Joined:
    Mar 22, 2013
    Posts:
    2
    Okay so I'm just trying to make a simple movement curve for the Main camera.

    I followed the instructional videos and I Ctrl+D'ed to make additonal paths for the camera to follow. But for some reason creating another path totally screws up the cutscene camera it is attached to. It is looking at some place weird totally opposite direction of where I want the camera to look at.
    And it seems the only way to undo this is deleting the new path node, and detaching the curve off the cutscene camera. Plus I have to rerotate the cutscene camera to where I originally wanted it to look at.

    All I want is the camera to pan across the in game field to give overview of the level to the player. Am I missing a step or is this intentional function in the Aperture plugin?

    Also if I have multiple paths in the curve, how do I adjust the rotation of the camera at certain points in the curve? Once the cutscene camera is attached to a curve I cannot adjust the camera further so I tried rotating the path node itself and it does not seem to do anything,

    please help thank you
     
  10. gearworks

    gearworks

    Joined:
    Mar 24, 2013
    Posts:
    3
    Can you advice me on how the "Add extra target" works in Aperture?
    I add another target but it is not affected by the curve clip :/

    ...what am I missing?
     
  11. God-at-play

    God-at-play

    Joined:
    Nov 3, 2006
    Posts:
    330
    This tool is quite handy, thanks :)

    Is there a way to tell if the playhead of the timeline is before or after the curve for a given Curve Track? I want to create an Action that basically works like iMovie where a GameObject's MeshRenderer is only enabled during the actual curve, and disabled otherwise. I find this to be a much more visually intuitive, user-friendly, and simply faster system compared to using two Events for the enabling and disabling.

    Trying to get that to work has resulted in a pretty hacky and potentially delicate approach of checking in two locations for the CurveClip's lastValue within a threshold of the start and end. Is there a better way than this?
    Code (csharp):
    1. #pragma strict
    2. @script AddComponentMenu("Cutscene/Actions/Show Renderer")
    3.  
    4. @script ExecuteInEditMode()
    5.  
    6. @CutsceneEventOverrideNameAttribute("Show Renderer")
    7.  
    8. class Action_ShowRenderer extends CutsceneAction
    9. {
    10.     var theClip : CurveClip = null;
    11.    
    12.     // if set as the Action, called every new frame inside the CurveClip
    13.     @CutsceneActionAttribute("Show Renderer")
    14.     function ShowRenderer(value:float)
    15.     {
    16.         if (renderer  !renderer.enabled)
    17.         {
    18.             // enable by default
    19.             renderer.enabled = true;
    20.         }
    21.        
    22.         if (renderer  renderer.enabled)
    23.         {
    24.             // disable if outside the clip bounds set below
    25.             // NOTE: this is required in both locations to catch all edge cases
    26.             if (isOutsideClip())
    27.                 renderer.enabled = false;
    28.         }
    29.     }
    30.    
    31.     // called every new frame inside the CurveClip
    32.     @CutsceneEventExclude()
    33.     function OnTimeOverCurveClip(curveClip:CurveClip)
    34.     {
    35.         // set the clip so our Action can access its lastValue
    36.         theClip = curveClip;
    37.        
    38.         if (renderer  !renderer.enabled)
    39.         {
    40.             // enable by default
    41.             renderer.enabled = true;
    42.         }
    43.        
    44.         if (renderer  renderer.enabled  isOutsideClip())
    45.         {
    46.             // disable if outside the clip bounds set below
    47.             // NOTE: this is required in both locations to catch all edge cases
    48.             renderer.enabled = false;
    49.         }
    50.     }
    51.    
    52.     function isOutsideClip():boolean
    53.     {
    54.         return theClip  (theClip.lastValue < 0.003f || theClip.lastValue > 0.97f);
    55.     }
    56. }
     
  12. seanmars

    seanmars

    Joined:
    Jun 7, 2011
    Posts:
    14
    upgrade to unity4.1.2.In monodevelop to build, get aperture.all error.
    Code (csharp):
    1.  
    2. Decompilation failed:
    3. System.IO.FileNotFoundException: Could not resolve: UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
    4.    In Mono.Cecil.BaseAssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters) 於 c:\BuildAgent\work\f07246b5212f7be4\monodevelop\main\contrib\Mono.Cecil\Mono.Cecil\Mono.Cecil\BaseAssemblyResolver.cs:155
    5.    In Mono.Cecil.DefaultAssemblyResolver.Resolve(AssemblyNameReference name) 於 c:\BuildAgent\work\f07246b5212f7be4\monodevelop\main\contrib\Mono.Cecil\Mono.Cecil\Mono.Cecil\DefaultAssemblyResolver.cs:57
    6.    In MonoDevelop.Projects.Dom.DomCecilCompilationUnit.SimpleAssemblyResolver.Resolve(AssemblyNameReference name) 於 c:\BuildAgent\work\f07246b5212f7be4\monodevelop\main\src\core\MonoDevelop.Core\MonoDevelop.Projects.Dom\DomCecilCompilationUnit.cs:178
    7.    In ICSharpCode.Decompiler.Ast.Transforms.IntroduceUsingDeclarations.Run(AstNode compilationUnit) 於 c:\BuildAgent\work\f07246b5212f7be4\monodevelop\main\contrib\ICSharpCode.Decompiler\Ast\Transforms\IntroduceUsingDeclarations.cs:66
    8.    In ICSharpCode.Decompiler.Ast.Transforms.TransformationPipeline.RunTransformationsUntil(AstNode node, Predicate`1 abortCondition, DecompilerContext context) 於 c:\BuildAgent\work\f07246b5212f7be4\monodevelop\main\contrib\ICSharpCode.Decompiler\Ast\Transforms\TransformationPipeline.cs:60
    9.    In ICSharpCode.Decompiler.Ast.AstBuilder.RunTransformations(Predicate`1 transformAbortCondition) 於 c:\BuildAgent\work\f07246b5212f7be4\monodevelop\main\contrib\ICSharpCode.Decompiler\Ast\AstBuilder.cs:116
    10.    In MonoDevelop.AssemblyBrowser.DomMethodNodeBuilder.Decompile(TextEditorData data, ModuleDefinition module, TypeDefinition currentType, Action`1 setData) 於 c:\BuildAgent\work\f07246b5212f7be4\monodevelop\main\src\addins\MonoDevelop.AssemblyBrowser\MonoDevelop.AssemblyBrowser\DomMethodNodeBuilder.cs:158
    11.  
     
  13. duke

    duke

    Joined:
    Jan 10, 2007
    Posts:
    763
    Does anyone have an opinion on how this compares to uSequencer?
     
  14. wensk

    wensk

    Joined:
    Aug 9, 2012
    Posts:
    24
    Hi, I have purchased the Aperture Cutscene Editor , but I am a newbie for script, how can I stop the cutscene and jump to player camera use a key?

    I have writed a java script but it complete not work D:

    Can you help me? thanks.
     
    Last edited: May 30, 2013
  15. Cazual

    Cazual

    Joined:
    Dec 27, 2012
    Posts:
    21
    You mentioned "I think having multiple selections would be a good way of implementing this. Draggable groups would be cool too." is this going to come in any version, because I love the tool but when having to move events (and especially many event to insert another curve in front of them it is hell to move them all!

    Either way great tool!