Closed blawnode closed 2 months ago
Hi, if I understand correctly - there is already a SceneObjectOnly
attribute that allows only Scene objects to be assigned (otherwise there is a warning). I'm open to potential improvements.
Nah, not what I mean. [SceneObjectOnly] is for a specific asset type, selected from the Assets window, right?
The potential [NotPrefabObjectOnly] would not be for assets, but rather game objects located in a scene's hierarchy, and selected from the Hierarchy window.
Ok, got it. I think I can implement something similar.
Hey, I appreciate it! Thank you so much! And thank you for adding stuff even after so much time..!
Hello, I added NotPrefabObjectOnly
attribute. Drawer checks if an object is a prefab, if so then input will be ignored. Additionally, I added the AllowInstancedPrefabs property, if true then instanced prefabs from the Scene will be accepted. Is this the behaviour you expected?
Good thinking with the AllowInstancedPrefabs property! I think this is exactly what I hoped for! I'm sure this will be useful, and not only for me. I've tested the feature, and it seems to work fine.
If I may suggest, maybe adding it to PrefabObjectOnly could be handy.
But that idea aside, I believe that this feature is pretty much done. Think this issue should be closed?
There is already PrefabObjectOnlyAttribute
, which allows only connected prefab objects. Yes, if you feel that everything is ok then close the issue, please.
Ah yeah, I know there is a PrefabObjectOnlyAttribute. I meant that giving PrefabObjectOnlyAttribute the AllowInstancedPrefabs property is a neat idea. For now I'll close, the idea is probably irrelevant for this specific issue, as you've solved it.
Ach, sorry, probably I was reading too fast :D I will consider adding it there, thanks.
Could be plentily useful, when you want to target something loaded in the scene. Then one could Destroy it or SetActive it with less trouble about if it's a prefab or not.