|
@@ -1,7 +1,6 @@
|
|
using UnityEngine;
|
|
using UnityEngine;
|
|
using Live2D.Cubism.Rendering;
|
|
using Live2D.Cubism.Rendering;
|
|
using System.IO;
|
|
using System.IO;
|
|
-using FairyGUI;
|
|
|
|
using UnityEngine.Rendering;
|
|
using UnityEngine.Rendering;
|
|
using YooAsset;
|
|
using YooAsset;
|
|
using System.Collections.Generic;
|
|
using System.Collections.Generic;
|
|
@@ -523,7 +522,7 @@ namespace GFGGame
|
|
{
|
|
{
|
|
return gameObj;
|
|
return gameObj;
|
|
}
|
|
}
|
|
- gameObj = CreateObj(resPath);
|
|
|
|
|
|
+ gameObj = PrefabManager.Instance.SpawnSync(resPath);
|
|
if(gameObj == null)
|
|
if(gameObj == null)
|
|
{
|
|
{
|
|
return null;
|
|
return null;
|
|
@@ -560,7 +559,7 @@ namespace GFGGame
|
|
{
|
|
{
|
|
return gameObj;
|
|
return gameObj;
|
|
}
|
|
}
|
|
- gameObj = CreateObj(resPath);
|
|
|
|
|
|
+ gameObj = PrefabManager.Instance.SpawnSync(resPath);
|
|
if (gameObj == null)
|
|
if (gameObj == null)
|
|
{
|
|
{
|
|
return null;
|
|
return null;
|
|
@@ -620,19 +619,6 @@ namespace GFGGame
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
|
|
|
|
- public static GameObject CreateObj(string resPath)
|
|
|
|
- {
|
|
|
|
- if (!YooAssets.CheckResExist(resPath))
|
|
|
|
- {
|
|
|
|
- return null;
|
|
|
|
- }
|
|
|
|
- //var handle = YooAssets.LoadAssetSync<Sprite>(resPath);
|
|
|
|
- //Sprite sp = handle.AssetObject as Sprite;
|
|
|
|
- var gameObj = PrefabManager.Instance.SpawnSync(resPath);
|
|
|
|
- //AddAssetReleaser(gameObj, resPath);
|
|
|
|
- return gameObj;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
public static void LoadSpritePos(string resPath, out float tx, out float ty)
|
|
public static void LoadSpritePos(string resPath, out float tx, out float ty)
|
|
{
|
|
{
|
|
int index = resPath.LastIndexOf('.');
|
|
int index = resPath.LastIndexOf('.');
|