Пример #1
0
        /// <summary>
        /// Create Gaia Culling System Profile asset
        /// </summary>
#if UNITY_EDITOR
        public static GaiaSceneCullingProfile CreateCullingProfile()
        {
            GaiaSceneCullingProfile asset        = ScriptableObject.CreateInstance <GaiaSceneCullingProfile>();
            GaiaSettings            gaiaSettings = GaiaUtils.GetGaiaSettings();

            asset.UpdateCulling(gaiaSettings);
            asset.UpdateShadow();
            AssetDatabase.CreateAsset(asset, "Assets/Gaia Scene Culling Profile.asset");
            AssetDatabase.SaveAssets();
            return(asset);
        }
Пример #2
0
        public static void CreateCullingProfileMenu()
        {
            GaiaSceneCullingProfile asset        = ScriptableObject.CreateInstance <GaiaSceneCullingProfile>();
            GaiaSettings            gaiaSettings = GaiaUtils.GetGaiaSettings();

            asset.UpdateCulling(gaiaSettings);
            asset.UpdateShadow();
            AssetDatabase.CreateAsset(asset, "Assets/Gaia Scene Culling Profile.asset");
            AssetDatabase.SaveAssets();
            EditorUtility.FocusProjectWindow();
            Selection.activeObject = asset;
        }
Пример #3
0
        public void Initialize()
        {
            if (m_profile == null)
            {
                GaiaSettings gaiaSettings = GaiaUtils.GetGaiaSettings();
                m_profile = ScriptableObject.CreateInstance <GaiaSceneCullingProfile>();
                m_profile.UpdateCulling(gaiaSettings);
                m_profile.UpdateShadow();
            }

            ApplyToGameCamera();
        }