Exemplo n.º 1
0
    public override void UndoEvent()
    {
        if (!AffectedObject)
        {
            return;
        }

#if (UNITY_3_5)
        if (enableRecursively)
        {
            AffectedObject.SetActiveRecursively(prevEnable);
        }
        else
        {
            AffectedObject.active = prevEnable;
        }
#else
        AffectedObject.SetActive(prevEnable);
#endif
    }
Exemplo n.º 2
0
    public override void FireEvent()
    {
#if (UNITY_3_5)
        prevEnable = AffectedObject.active;
#else
        prevEnable = AffectedObject.activeSelf;
#endif

#if (UNITY_3_5)
        if (enableRecursively)
        {
            AffectedObject.SetActiveRecursively(enable);
        }
        else
        {
            AffectedObject.active = enable;
        }
#else
        AffectedObject.SetActive(enable);
#endif
    }