コード例 #1
0
 public GuiUiSceneBase ActiveAloneUiScene(string prefabsName, params object[] args)
 {
     if (AloneScene != null)
     {
         UnityEngine.Object.DestroyObject(AloneScene.gameObject);
         AloneScene = null;
     }
     if (prefabsName != "")
     {
         AloneScene = LoadResource_UIPrefabs(prefabsName).GetComponent <GuiUiSceneBase>();
         if (AloneScene != null)
         {
             AloneScene.SetTransferParameter(args);
         }
     }
     return(AloneScene);
 }
コード例 #2
0
    public GuiUiSceneBase ActivePoolingScene(string prefabsName, params object[] args)
    {
        if (prefabsName == "")
        {
            return(null);
        }
        GuiUiSceneBase s = LoadResource_UIPrefabs(prefabsName).GetComponent <GuiUiSceneBase>();

        if (s == null)
        {
            return(null);
        }
        if (PoolingSceneList.ContainsKey(s.uiSceneId))
        {
            UnityEngine.Object.DestroyObject(s.gameObject);
            return(null);
        }
        PoolingSceneList.Add(s.uiSceneId, s);
        s.SetTransferParameter(args);
        return(s);
    }