Exemplo n.º 1
0
 void SetPlatform(PlatformData data, PlatformData.Platform platform)
 {
     if (EditorUtility.DisplayDialog("Confirmation", "Switch target platform to " + platform.ToString() + "?", "Yes", "Cancel"))
     {
         data.SetPlatform(platform);
     }
 }
 void SetPlatform(PlatformData.Platform platform)
 {
     // Set gameobjects active depending on the input platform.
     CurrentPlatform = platform;
     if (platformObjects.Length < 1)
     {
         return;
     }
     foreach (var platformObject in platformObjects)
     {
         if (platformObject.GameObjects.Length > 0)
         {
             foreach (var gameObject in platformObject.GameObjects)
             {
                 gameObject.SetActive(platformObject.Platform == CurrentPlatform);
             }
         }
     }
 }
 public PlatformObjects(PlatformData.Platform platform, params GameObject[] gameObjects)
 {
     this.platform    = platform;
     this.gameObjects = gameObjects;
 }