static object PerformMemberwiseClone(ref object o)
        {
            var ins = new UnityEngine.Playables.PlayableGraph();

            ins = (UnityEngine.Playables.PlayableGraph)o;
            return(ins);
        }
예제 #2
0
    public override UnityEngine.Playables.Playable CreatePlayable(UnityEngine.Playables.PlayableGraph graph, UnityEngine.GameObject owner)
    {
        var playable = UnityEngine.Playables.ScriptPlayable <AkTimelineEventPlayableBehavior> .Create(graph);

        if (akEvent == null)
        {
            return(playable);
        }

        var b = playable.GetBehaviour();

        b.akEvent       = akEvent;
        b.blendInCurve  = blendInCurve;
        b.blendOutCurve = blendOutCurve;

        if (owningClip != null)
        {
            b.easeInDuration   = (float)owningClip.easeInDuration;
            b.easeOutDuration  = (float)owningClip.easeOutDuration;
            b.blendInDuration  = (float)owningClip.blendInDuration;
            b.blendOutDuration = (float)owningClip.blendOutDuration;
        }
        else
        {
            b.easeInDuration = b.easeOutDuration = b.blendInDuration = b.blendOutDuration = 0;
        }

        b.retriggerEvent     = retriggerEvent;
        b.StopEventAtClipEnd = StopEventAtClipEnd;
        b.eventObject        = owner;
        b.eventDurationMin   = eventDurationMin;
        b.eventDurationMax   = eventDurationMax;
        return(playable);
    }
예제 #3
0
    // override the type of mixer playable used by this track
    public override UnityEngine.Playables.Playable CreateTrackMixer(UnityEngine.Playables.PlayableGraph graph,
                                                                    UnityEngine.GameObject go, int inputCount)
    {
        var playable = UnityEngine.Playables.ScriptPlayable <AkRTPCPlayableBehaviour> .Create(graph, inputCount);

        setPlayableProperties();
        return(playable);
    }
예제 #4
0
 public void InitializeBehavior(UnityEngine.Playables.PlayableGraph graph, ref AkRTPCPlayableBehaviour b,
                                UnityEngine.GameObject owner)
 {
     b.overrideTrackObject = overrideTrackObject;
     b.setRTPCGlobally     = setRTPCGlobally;
     b.rtpcObject          = overrideTrackObject ? RTPCObject.Resolve(graph.GetResolver()) : owner;
     b.parameter           = Parameter;
 }
예제 #5
0
    public override UnityEngine.Playables.Playable CreatePlayable(UnityEngine.Playables.PlayableGraph graph,
                                                                  UnityEngine.GameObject go)
    {
        var playable = UnityEngine.Playables.ScriptPlayable <AkRTPCPlayableBehaviour> .Create(graph, template);

        var b = playable.GetBehaviour();

        InitializeBehavior(graph, ref b, go);
        return(playable);
    }
    public override UnityEngine.Playables.Playable CreatePlayable(UnityEngine.Playables.PlayableGraph graph, UnityEngine.GameObject gameObject)
    {
        var playable = UnityEngine.Playables.ScriptPlayable <AkTimelineRtpcPlayableBehaviour> .Create(graph, template);

        var b = playable.GetBehaviour();

        b.RTPC        = RTPC;
        b.setGlobally = setGlobally;
        b.gameObject  = gameObject;
        return(playable);
    }
    public override UnityEngine.Playables.Playable CreatePlayable(UnityEngine.Playables.PlayableGraph graph, UnityEngine.GameObject go)
    {
        var playable = UnityEngine.Playables.ScriptPlayable <AkRTPCPlayableBehaviour> .Create(graph, template);

        var b = playable.GetBehaviour();

        b.overrideTrackObject = overrideTrackObject;
        b.setRTPCGlobally     = setRTPCGlobally;
        b.rtpcObject          = overrideTrackObject ? RTPCObject.Resolve(graph.GetResolver()) : go;
        b.parameter           = Parameter;
        return(playable);
    }
예제 #8
0
    public override UnityEngine.Playables.Playable CreatePlayable(UnityEngine.Playables.PlayableGraph graph,
                                                                  UnityEngine.GameObject owner)
    {
        var playable = UnityEngine.Playables.ScriptPlayable <AkEventPlayableBehavior> .Create(graph);

        var b = playable.GetBehaviour();

        initializeBehaviour(graph, b, owner);
        b.akEventMinDuration = eventDurationMin;
        b.akEventMaxDuration = eventDurationMax;
        return(playable);
    }
예제 #9
0
    public override UnityEngine.Playables.Playable CreateTrackMixer(UnityEngine.Playables.PlayableGraph graph, UnityEngine.GameObject gameObject, int inputCount)
    {
        var playable = UnityEngine.Playables.ScriptPlayable <AkTimelineRtpcPlayableBehaviour> .Create(graph, inputCount);

        var clips = GetClips();

        foreach (var clip in clips)
        {
            var rtpcPlayable = (clip.asset as AkTimelineRtpcPlayable);
            rtpcPlayable.owningClip = clip;
            rtpcPlayable.SetupClipDisplay();
        }

        return(playable);
    }
예제 #10
0
    public override UnityEngine.Playables.Playable CreateTrackMixer(UnityEngine.Playables.PlayableGraph graph,
                                                                    UnityEngine.GameObject go, int inputCount)
    {
#if UNITY_EDITOR
        var Settings  = WwiseSettings.LoadSettings();
        var WprojPath = AkUtilities.GetFullPath(UnityEngine.Application.dataPath, Settings.WwiseProjectPath);
        AkUtilities.EnableBoolSoundbankSettingInWproj("SoundBankGenerateEstimatedDuration", WprojPath);
#endif
        var playable = UnityEngine.Playables.ScriptPlayable <AkEventPlayableBehavior> .Create(graph);

        UnityEngine.Playables.PlayableExtensions.SetInputCount(playable, inputCount);
        setFadeTimes();
        setOwnerClips();
        return(playable);
    }
        static void WriteBackInstance(CSHotFix.Runtime.Enviorment.AppDomain __domain, StackObject *ptr_of_this_method, IList <object> __mStack, ref UnityEngine.Playables.PlayableGraph instance_of_this_method)
        {
            ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method);
            switch (ptr_of_this_method->ObjectType)
            {
            case ObjectTypes.Object:
            {
                __mStack[ptr_of_this_method->Value] = instance_of_this_method;
            }
            break;

            case ObjectTypes.FieldReference:
            {
                var ___obj = __mStack[ptr_of_this_method->Value];
                if (___obj is ILTypeInstance)
                {
                    ((ILTypeInstance)___obj)[ptr_of_this_method->ValueLow] = instance_of_this_method;
                }
                else
                {
                    var t = __domain.GetType(___obj.GetType()) as CLRType;
                    t.SetFieldValue(ptr_of_this_method->ValueLow, ref ___obj, instance_of_this_method);
                }
            }
            break;

            case ObjectTypes.StaticFieldReference:
            {
                var t = __domain.GetType(ptr_of_this_method->Value);
                if (t is ILType)
                {
                    ((ILType)t).StaticInstance[ptr_of_this_method->ValueLow] = instance_of_this_method;
                }
                else
                {
                    ((CLRType)t).SetStaticFieldValue(ptr_of_this_method->ValueLow, instance_of_this_method);
                }
            }
            break;

            case ObjectTypes.ArrayReference:
            {
                var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as UnityEngine.Playables.PlayableGraph[];
                instance_of_arrayReference[ptr_of_this_method->ValueLow] = instance_of_this_method;
            }
            break;
            }
        }
예제 #12
0
    public override UnityEngine.Playables.Playable CreateTrackMixer(UnityEngine.Playables.PlayableGraph graph, UnityEngine.GameObject go, int inputCount)
    {
        var playable = UnityEngine.Playables.ScriptPlayable <AkEventPlayableBehavior> .Create(graph);

        UnityEngine.Playables.PlayableExtensions.SetInputCount(playable, inputCount);

        var clips = GetClips();

        foreach (var clip in clips)
        {
            var akEventPlayable = clip.asset as AkEventPlayable;
            akEventPlayable.owningClip = clip;
        }

        return(playable);
    }
예제 #13
0
        static StackObject *Create_1(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Int32 @inputCount = ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.Playables.PlayableGraph @graph = (UnityEngine.Playables.PlayableGraph) typeof(UnityEngine.Playables.PlayableGraph).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);


            var result_of_this_method = UnityEngine.Playables.Playable.Create(@graph, @inputCount);

            return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method));
        }
예제 #14
0
    public void initializeBehaviour(UnityEngine.Playables.PlayableGraph graph, AkEventPlayableBehavior b,
                                    UnityEngine.GameObject owner)
    {
        b.akEvent                    = akEvent;
        b.eventTracker               = eventTracker;
        b.easeInDuration             = easeInDuration;
        b.easeOutDuration            = easeOutDuration;
        b.blendInDuration            = blendInDuration;
        b.blendOutDuration           = blendOutDuration;
        b.eventShouldRetrigger       = retriggerEvent;
        b.overrideTrackEmittorObject = overrideTrackEmitterObject;

        if (overrideTrackEmitterObject)
        {
            b.eventObject = emitterObjectRef.Resolve(graph.GetResolver());
        }
        else
        {
            b.eventObject = owner;
        }
    }
예제 #15
0
        static StackObject *CreatePlayable_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 3);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.GameObject @owner = (UnityEngine.GameObject) typeof(UnityEngine.GameObject).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.Playables.PlayableGraph @graph = (UnityEngine.Playables.PlayableGraph) typeof(UnityEngine.Playables.PlayableGraph).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
            UnityEngine.Playables.PlayableAsset instance_of_this_method;
            instance_of_this_method = (UnityEngine.Playables.PlayableAsset) typeof(UnityEngine.Playables.PlayableAsset).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.CreatePlayable(@graph, @owner);

            return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method));
        }