void DrawController() { CSCommonEditor.BeginContents(); GUILayout.BeginHorizontal(); GUILayout.Label("Res AssetName", GUILayout.Width(70)); ctlResName = GUILayout.TextArea(ctlResName, GUILayout.MinWidth(120)); GUILayout.Label("Chunk AssetName", GUILayout.Width(70)); ctlChunkName = GUILayout.TextField(ctlChunkName, GUILayout.MinWidth(120)); isInstance = GUILayout.Toggle(isInstance, "IsInstance", GUILayout.MinWidth(120)); if (GUILayout.Button("Load", GUILayout.Width(70))) { ResourcesManager.Instance.Load(ctlResName, ctlChunkName, () => { if (isInstance) { GameObject obj = ResourcesManager.Instance.GetResources <GameObject>(ctlResName); Object.Instantiate(obj); } }); } GUILayout.EndHorizontal(); if (CSCommonEditor.DrawTextButton("Chunk AssetName", ref ctlUnChunkName, "UnLoad")) { ResourcesManager.Instance.Unload(ctlUnChunkName); } if (CSCommonEditor.DrawTextButton("Res AssetName", ref ctlUnResName, "UnLoad")) { ResourcesManager.Instance.Editor_UnloadRes(ctlUnResName); } CSCommonEditor.EndContents(); GUILayout.Space(10f); }