public void Rollback()
 {
     restoreStates();
     if (mDelete)
     {
         DTLayerUtility.RemoveLayer(mTempLayerIndex);
     }
 }
 public TempLayerGroup(string layerName, params GameObject[] gameObjects)
 {
     if (gameObjects != null)
     {
         mGameObjects = gameObjects;
     }
     backupStates();
     mDelete         = DTLayerUtility.HasLayer(layerName);
     mTempLayerIndex = DTLayerUtility.GetLayer(layerName, true);
     foreach (var o in mGameObjects)
     {
         o.layer = mTempLayerIndex;
     }
 }
 public TempLayerGroup VisibleState(bool visible)
 {
     DTLayerUtility.SetLayerVisibility(mTempLayerIndex, visible);
     return(this);
 }
 public TempLayerGroup LockState(bool locked)
 {
     DTLayerUtility.SetLayerLock(mTempLayerIndex, locked);
     return(this);
 }