Exemplo n.º 1
0
        public static AnimationPlayableOutput Create(PlayableGraph graph, string name, Animator target)
        {
            PlayableOutputHandle handle;

            if (!AnimationPlayableGraphExtensions.InternalCreateAnimationOutput(ref graph, name, out handle))
            {
                return(AnimationPlayableOutput.Null);
            }

            AnimationPlayableOutput output = new AnimationPlayableOutput(handle);

            output.SetTarget(target);

            return(output);
        }
        public static AnimationPlayableOutput Create(PlayableGraph graph, string name, Animator target)
        {
            PlayableOutputHandle    handle;
            AnimationPlayableOutput result;

            if (!AnimationPlayableGraphExtensions.InternalCreateAnimationOutput(ref graph, name, out handle))
            {
                result = AnimationPlayableOutput.Null;
            }
            else
            {
                AnimationPlayableOutput animationPlayableOutput = new AnimationPlayableOutput(handle);
                animationPlayableOutput.SetTarget(target);
                result = animationPlayableOutput;
            }
            return(result);
        }