Ejemplo n.º 1
0
        void OnLoadedCfgFile(AssetCat assetCat)
        {
            string className   = "CsCat.Cfg" + Path.GetFileNameWithoutExtension(assetCat.assetPath).UpperFirstLetter();
            string jsonContent = assetCat.Get <TextAsset>().text;

            TypeUtil.GetType(className).GetPropertyValue("Instance").InvokeMethod("Parse", false, jsonContent);
            loadedCount++;
        }
Ejemplo n.º 2
0
        void OnLoadedCfgFilePaths(AssetCat assetCat)
        {
            string fileContent = assetCat.Get <TextAsset>().text;

            fileContent = fileContent.Replace("\r", "");
            string[] filePaths = fileContent.Split('\n');
            loadedCount = 0;
            totalCount  = filePaths.Length;
            for (var i = 0; i < filePaths.Length; i++)
            {
                var filePath = filePaths[i];
                resLoadComponent.GetOrLoadAsset(filePath, OnLoadedCfgFile);
            }
        }
Ejemplo n.º 3
0
        public virtual void OnAllAssetsLoadDone()
        {
            if (!prefabPath.IsNullOrWhiteSpace())
            {
                GameObject prefab = prefabAssetCat.Get <GameObject>();
                GameObject clone  = InstantiateGameObject(prefab);
                clone.name = prefab.name;
                clone.transform.CopyFrom(prefab.transform);
                SetGameObject(clone, null);
            }

            if (this.parentTransform != null)
            {
                SetParentTransform(this.parentTransform);
            }
        }