AmIadded() public méthode

public AmIadded ( ObjectProperties, objectProperties ) : void
objectProperties ObjectProperties,
Résultat void
Exemple #1
0
    public void OnEnable()
    {
        if (debugLogness)
        {
            Debug.Log("Enable Properties", this);
        }
        if (timeOfDayManager == null)
        {
            Debug.LogWarning("no timeOfDayManager found, so finding one now ( you should make sure TimeOfDayManager runs first and finds all objects it wants to control", this); // If a TimeOfDayManager fails to claim this as something for it to control, the item itself can find a TimeOfDayManager and tell it to control it, this is expensive at the moment as each time this happens it requests the TimeOfDayManager seek all scene objects, so is used in emergency only hence the above warning
            timeOfDayManager = FindObjectOfType <TimeOfDayManager>();                                                                                                             // may have multiple managers in future so bad
        }


        if (timeOfDayManager != null)
        {
            timeOfDayManager.AmIadded(this);                                   // For editor use
        }
        if (mirrorLight)
        {
            mirror();
        }
        Setup();
        hasSetup = true;
        Run();
    }