// ========================================================================== // // ===================================== // // public - [Do] Function // // 외부 객체가 요청 // // ===================================== // static public CLASS DoMakeInstance(MonoBehaviour pBaseClass, string strFolderPath, EResourcePath eResourcePath = EResourcePath.Resources) { CLASS pInstance = new CLASS(); pInstance._pBase = pBaseClass; pInstance._eResourcePath = eResourcePath; pInstance._strResourceLocalPath = strFolderPath; bool bIsMultipleResource = false; pInstance.OnMakeClass(pBaseClass, ref bIsMultipleResource); if (eResourcePath == EResourcePath.Resources) { pInstance.InitResourceOrigin(); pInstance.OnMakeClass_AfterInitResource(pBaseClass); } _pInstance = pInstance; return(pInstance); }
// ========================================================================== // // ===================================== // // public - [Do] Function // // 외부 객체가 요청 // // ===================================== // static public CLASS DoMakeInstance(MonoBehaviour pBaseClass, string strFolderPath, EResourcePath eResourcePath = EResourcePath.Resources) { if (pBaseClass == null) { Debug.LogWarning("Base Class가 없습니다. " + typeof(CLASS).ToString()); return(null); } CLASS pInstance = new CLASS(); pInstance._pBase = pBaseClass; pInstance._eResourcePath = eResourcePath; pInstance._strResourceLocalPath = strFolderPath; bool bIsMultipleResource = false; pInstance.OnMakeClass(pBaseClass, ref bIsMultipleResource); if (eResourcePath == EResourcePath.Resources) { pInstance.InitResourceOrigin(); pInstance.OnMakeClass_AfterInitResource(pBaseClass); } if (_pInstance == null) { _pInstance = pInstance; } return(pInstance); }