Exemple #1
0
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.A))
     {
         ResourcesManagerUtility.InstantiateAssetSync(prefabPath, parent, false);
     }
 }
Exemple #2
0
        /// <summary>/// 创建页面实例/// </summary>
        private static void CreateUIPageInstance(string pageName, string pagePath, Transform parent, Action <GameObject> afterInitialedInstanceAction, LoadAssetChannelUsage loadAssetChannel)
        {
            GameObject go = ResourcesManagerUtility.InstantiateAssetSync(pagePath, parent, false, loadAssetChannel);

            if (go != null)
            {
                go.name = pageName;
            }
            afterInitialedInstanceAction?.Invoke(go);
        }