Browse Source

用命令实例化

蓝色星空 1 year ago
parent
commit
b4f6a68f17

+ 14 - 0
Assets/Prefabs/BluePrefabs/BlueRoot.prefab

@@ -10,6 +10,7 @@ GameObject:
   m_Component:
   - component: {fileID: 8671475187487430762}
   - component: {fileID: 4456192713818240891}
+  - component: {fileID: 1976901807331166432}
   m_Layer: 0
   m_Name: BlueRoot
   m_TagString: Untagged
@@ -46,6 +47,19 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 4632509381976ba4c9f1e18039e130cd, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
+--- !u!114 &1976901807331166432
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 4520612451748474568}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 6c2de6865248cbf48bc9eba714d6d117, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  blueObject: {fileID: 11400000, guid: d2576af9f7ec3f744825e84161cd125b, type: 2}
 --- !u!1 &7326868924308516955
 GameObject:
   m_ObjectHideFlags: 0

+ 2 - 1
Assets/Scripts/Blue/ScriptableObject/PrefabsAsset.asset

@@ -12,4 +12,5 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 42bd45210da6ebd4eb8f07aaf741ea5f, type: 3}
   m_Name: PrefabsAsset
   m_EditorClassIdentifier: 
-  WarningPopUp: {fileID: 0}
+  WarningPopUp: {fileID: 2160148988178575977, guid: 725f0ac354735774cbc2e7c450ccb350,
+    type: 3}

+ 0 - 1
Assets/Scripts/Blue/System/InstantiateSystem.cs

@@ -9,6 +9,5 @@ public class InstantiateSystem : SingletonMonobehaviour<InstantiateSystem>
     public void InstantiatePrefab(GameObject prefab)
     {
         Instantiate(prefab);
-        Debug.LogError(prefab.name);
     }
 }

+ 1 - 1
Assets/Scripts/UI/SceneChoose.cs

@@ -104,7 +104,7 @@ public class SceneChoose : BaseUI
             //Module_Notice.getInstance.SetNoticeInfo("未选择导览场景", "请先勾选要进入的场景", NoticeType.Normal, 1.7f);
             //Module_Notice.getInstance._Follower.WindowAnchor = TextAnchor.UpperCenter;
             //Module_Notice.getInstance.StartNotice(3f);
-            Instantiate(Resources.Load<GameObject>("Warning/WarningPopUp"));
+            this.SendCommand(new InstantiateCommand(InstantiateSystem.Instance.BlueObject.WarningPopUp));
         }
     }