UnityEngine.Experimental.Director.Playable.Disconnect C# (CSharp) Méthode

Disconnect() public static méthode

public static Disconnect ( Playable target, int inputPort ) : void
target Playable
inputPort int
Résultat void
        public static void Disconnect(Playable target, int inputPort)
        {
            if (CheckPlayableValidity(target, "target") && target.CheckInputBounds(inputPort))
            {
                DisconnectInternal(target, inputPort);
            }
        }

Usage Example

Exemple #1
0
        public unsafe bool SetInputs(IEnumerable <Playable> sources)
        {
            for (int i = 0; i < this.inputCount; i++)
            {
                Playable.Disconnect(*((Playable *)this), i);
            }
            bool flag            = false;
            int  targetInputPort = 0;

            foreach (Playable playable in sources)
            {
                if (targetInputPort < this.inputCount)
                {
                    flag |= Playable.Connect(playable, *((Playable *)this), -1, targetInputPort);
                }
                else
                {
                    flag |= Playable.Connect(playable, *((Playable *)this), -1, -1);
                }
                this.node.SetInputWeight(targetInputPort, 1f);
                targetInputPort++;
            }
            for (int j = targetInputPort; j < this.inputCount; j++)
            {
                this.node.SetInputWeight(j, 0f);
            }
            return(flag);
        }
All Usage Examples Of UnityEngine.Experimental.Director.Playable::Disconnect