public static DynamicWorldLightmapProfile getProfile() { if (_profile == null) { DynamicWorldLightmapProfile profile = AssetDatabase.LoadAssetAtPath(_worldLightmapProfile, typeof(DynamicWorldLightmapProfile)) as DynamicWorldLightmapProfile; if (profile == null) { Debug.LogWarning("没有默认的大世界lightmap信息的配置文件,自动创建!"); profile = ScriptableObject.CreateInstance <DynamicWorldLightmapProfile>(); AssetDatabase.CreateAsset(profile, _worldLightmapProfile); AssetDatabase.SaveAssets(); } _profile = profile; } return(_profile); }
public static void ClearProfile() { _profile = null; }