Exemple #1
0
    // Instantiate 하지 않은 크리쳐로딩.
    public static GameObject CreatureDefaultLoadPrefab(string aPrefabName)
    {
#if ASSET_BUNDLE
        GameObject resultObj = ResourceBundle.intance.ResourceObject(UtilFunc.GetCreatureBundleName(aPrefabName), aPrefabName, typeof(GameObject)) as GameObject;
#else
        GameObject resultObj = Resources.Load(UtilFunc.GetCreatureResName(aPrefabName)) as GameObject;
#endif
        if (resultObj == null)
        {
#if DEBUG_LOG
            Debug.LogError(string.Format("<color=red>UIResourceMgr->CreatureDefaultLoadPrefab 크리쳐 모델 로드 실패 모델 리소스 {0} 가 존재하지 않는다.</color>", aPrefabName));
#endif
            return(null);
        }

#if ASSET_BUNDLE
        ReLinkAtlas(resultObj);
#endif

        return(resultObj);
    }
Exemple #2
0
    // Instantiate 한 크리쳐 모델 로드하고 리턴.
    public static GameObject CreateCreatureModel(string szResourceName, string changeName, Transform parent, SetTransformType TransformType)
    {
#if ASSET_BUNDLE
        GameObject OriginObj = ResourceBundle.intance.ResourceObject(UtilFunc.GetCreatureBundleName(szResourceName), szResourceName, typeof(GameObject)) as GameObject;
#else
        GameObject OriginObj = Resources.Load(UtilFunc.GetCreatureResName(szResourceName)) as GameObject;
#endif
        if (OriginObj == null)
        {
#if DEBUG_LOG
            Debug.LogError(string.Format("<color=red>UIResourceMgr->LoadInstantiateCreatureModel 크리쳐 모델 로드 실패 모델 리소스 {0} 가 존재하지 않는다.</color>", szResourceName));
#endif
            return(null);
        }

        if (string.IsNullOrEmpty(changeName) == true)
        {
            changeName = OriginObj.name;
        }

        GameObject resultObj = InstantiateGameObject(OriginObj, parent, TransformType, changeName);

        return(resultObj);
    }