void BakeAmbientProbe() { OcclusionProbes occlusionProbes = (OcclusionProbes)target; occlusionProbes.BakeAmbientProbe(); AssetDatabase.SaveAssets(); }
void AddOcclusionProbesDetail() { OcclusionProbes occlusionProbes = (OcclusionProbes)target; GameObject go = new GameObject("OcclusionProbesDetail"); OcclusionProbesDetail occlusionProbesDetail = go.AddComponent <OcclusionProbesDetail>(); go.transform.parent = occlusionProbes.transform; go.transform.localPosition = Vector3.zero; go.transform.localScale = Vector3.one; occlusionProbes.m_OcclusionProbesDetail.Add(occlusionProbesDetail); EditorUtility.SetDirty(occlusionProbes); }
void OnEnable() { #if UNITY_EDITOR AddLightmapperCallbacks(); #endif if (Application.isPlaying) { Debug.Assert(Instance == null); } Instance = this; }
void OnDisable() { #if UNITY_EDITOR RemoveLightmapperCallbacks(); #endif if (Application.isPlaying) { Debug.Assert(Instance == this); } if (Instance == this) { Instance = null; } }
void OnEnable() { #if UNITY_EDITOR AddLightmapperCallbacks(); #endif if (Application.isPlaying) { Debug.Assert(Instance == null); } Instance = this; #if !HDRP_ENABLED //legacy Camera.onPreRender += this.CameraPreRender; #endif }
void OnDrawGizmosSelected() { OcclusionProbes.DrawGizmos(transform, m_XCount, m_YCount, m_ZCount); }