HideFlags on children of visible objects.
No matter what I try, I can't get HideFlags.HideInHierarchy to perform like I expect it to. Should I be able to hide objects which are the children of visible objects? Blockquoteclass HideFlagManager...
View ArticleIs there a HideFlags.DontSave equivalent for preventing child objects from...
I have a prefab that adds GameObjects as children of itself on Start(). I want this to occur in the editor (using ExecuteInEditMode) so that I can preview the scene without actually playing the game....
View ArticleHow can I undo HideFlags.NotEditable;
I have a gameobject with script, the script has a lock boollean and when true it activates gameObject.hideFlags = HideFlags.NotEditable; But how can I undo this when the user want to be able to select...
View ArticleWhen do you use DontSave for Object's hideFlags?
What are the common use cases in which Object's hideFlags is set to DontSave?
View ArticleUnity hideflags - hide in hierarchy but still render in scene
Hey guys, I am making some editor tools. An object has a monobehaviour that takes in an array of gameobjects and draws lines from one to the other. I have an editor tool to add/delete these gameobjects...
View ArticleUse more than a hideflag
How can i use more than a hideflag in the same object in C#? **Example:** obj.hideFlags = HideFlags.HideInHierarchy + HideFlags.HideInInspector; Thanks in advance...
View ArticleProfiler has HideFlags.DontSave Assets taking up 86mb [What is this?]
Hello, so I'm having a problem with using a lot of memory. In the profiler I can see that HideFlags.DontSave Assets is using 86.8mb Beyond that Texture2D is using 85.4mb of this. How can I figure out...
View ArticleWhy does my prefab create a child by itself in ProjectView
No matter how many times I remake the prefab, whenever I click 'Save Project' it will create a child of itself. It seems to be of type Transform. You can't even click it. I had this problem once before...
View ArticleUnity Editor Scripting - Saving data in scriptable object problem
So I have a custom inspector, where you can add objects (meshes, audioclips, a variety of stuff) to it. Before these things get officially added (you have to click apply), they are stored in a...
View ArticleHow to select a hidden MeshRenderer in SceneView?
Hi all I have a Mesh being presented in the SceneView via a MeshFilter and MeshRenderer. The Mesh, Components and GameObject all have their flags set to HideAndDontSave. The geometry is drawn in the...
View ArticleHideFlags.DontSave is included in build
Hey guys, Everytime I try to build my project I get the errors below. Does anyone have any idea what could be causing this and how I could find the problem? Thank you An asset is marked with...
View ArticleBug with displaying components in Inspector after hideFlags.NotEditable?
Hey everyone! I've been running into a strange bug lately, maybe someone has seen something like it before. In messing around with object hideFlags, (specifically NotEditable), I've managed to break...
View ArticleAddObjectToAsset + HideFlags.HideAndDontSave
Hello ! I have an asset file that contains an array of "abstract class". I have read this post about serialization in unity :...
View ArticleInstantiating a prefab in the editor is orphaning the children of the prefabs
I have a script I wrote that I am attaching to an empty game object. This script instantiates a prefab that is dropped on it's public GameObject "instantiateObj" variable. I set the Hideflags of...
View ArticleAssetDatabase.IsSubAsset and HideFlags Questions
Hello. So I have a sub-asset called [some_sub_asset] which is a part of [main_asset]. I set the hideflag for [some_sub_asset] as "HideInHierarchy", so it looks nicer in the hierarchy window (so it...
View ArticleGameObject HideFlags.DontSave not working as expected
I expected the following MonoBehaviour (tested in a blank project) to cause the GameObject to which it is attached to exist in the scene in the editor but not when the game is played. This does not...
View ArticleHow to force object selection to be the parent of a selected object, when the...
The scenario can be minimised to be the following: I have an empty GameObject which has a child object in the hierarchy. The child object has a SpriteRenderer component attached, as well as an actual...
View ArticleHow to record hideFlags for Undo/Redo
**Greetings!** Thank you in advance for your help. How do you record a GameObject's hideFlag state change in the Undo/Redo system? I have tried both Undo.RecordObject and...
View ArticleUnity 5.3/5.4b: HideFlags and scripts not running?
My team is using HideFlags with an internal source control system to allow us to lock root objects in scenes from being edited. This system has worked for us through 4.0 through now, but starting with...
View ArticleTexture2D variable causes MissingReferenceException
I've suffered a MissReferenceException when using Texture2D. With below code, public abstract class TestBase { protected readonly Texture2D texture; public TestBase() { texture = new Texture2D(100,...
View Article