Ejemplo n.º 1
0
        protected override void Initialize()
        {
            // Fields
            randomness.Initialize(this);

            // Outputs
            OutputSlot.CreateOrResetUnpersisted <IRandom>(ref randomOutputSlot, this, "Randomness", true);
        }
Ejemplo n.º 2
0
        public void OnAfterDeserialize()
        {
            randomness.ResetIfBroken(this);

            if (randomOutputSlot != null && randomOutputSlot.generator != null)
            {
                OutputSlot.ResetAssetTypeIfNull <IRandom>(randomOutputSlot);
            }
            else
            {
                OutputSlot.CreateOrResetUnpersisted <IRandom>(ref randomOutputSlot, this, "Randomness", true);
            }
        }