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
parent
4e4b9eb2a7
commit
5607dc4eed
|
@ -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>();
|
||||
|
|
|
@ -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
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue