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

Connect() public static méthode

public static Connect ( Playable source, Playable target ) : bool
source Playable
target Playable
Résultat bool
        public static bool Connect(Playable source, Playable target)
        {
            return Connect(source, target, -1, -1);
        }

Same methods

Playable::Connect ( Playable source, Playable target, int sourceOutputPort, int targetInputPort ) : bool

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::Connect