feat: Automatically generated objects are no longer editable (NotEditable).

The automatically generated objects (UIParticleRenderer, UIParticleOverlayCamera) are not editable and will not be saved in scenes or prefabs.
pull/289/head
mob-sakai 2023-12-23 14:28:55 +09:00
parent 4e4b9eb2a7
commit 5607dc4eed
2 changed files with 2 additions and 2 deletions

View File

@ -647,7 +647,7 @@ namespace Coffee.UIExtensions
// Create ortho-camera.
if (!_orthoCamera)
{
var go = new GameObject("[generated] UIParticleOverlayCamera") { hideFlags = HideFlags.DontSave };
var go = new GameObject("[generated] UIParticleOverlayCamera") { hideFlags = HideFlags.DontSave | HideFlags.NotEditable };
go.SetActive(false);
go.transform.SetParent(transform, false);
_orthoCamera = go.AddComponent<Camera>();

View File

@ -152,7 +152,7 @@ namespace Coffee.UIExtensions
// Create renderer object.
var go = new GameObject("[generated] UIParticleRenderer", typeof(UIParticleRenderer))
{
hideFlags = HideFlags.DontSave,
hideFlags = HideFlags.DontSave | HideFlags.NotEditable,
layer = parent.gameObject.layer
};