Editor Note Destroy Question

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
nathanj
Posts: 303
Joined: Sat May 28, 2016 12:30 am

Editor Note Destroy Question

Post by nathanj »

Hi Tony,

I just noticed that the Editor Note component destroys itself when in build. Is this necessary?

I really like the component and would like to use it to mark up more game objects but if it destroys those objects in build its not usable for me. It's easy enough to edit the script and comment out "Destroy(this)" on my end but I'm wondering why it's written as is?

Thanks as always
Nathan
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Editor Note Destroy Question

Post by Tony Li »

Hi Nathan,

What's your use-case for Editor Note? The original idea was that it would just provide a note in the editor when you're inspecting GameObjects, but it wouldn't take up any space in builds. Do you want to be able to access the note's content at runtime in a build?
User avatar
nathanj
Posts: 303
Joined: Sat May 28, 2016 12:30 am

Re: Editor Note Destroy Question

Post by nathanj »

I had thrown it on some management components to explain things to my future self and colleagues. I could just have a note component thrown on an empty game object, that totally works.

Does it destory the component or the gameobject?

I just noticed that the error i was having was due to my own set up and not the editor script, so this whole thread could, once again, be a simple result of user misunderstanding ;)
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Editor Note Destroy Question

Post by Tony Li »

It only destroys the Editor Note component. It leaves the rest of the GameObject untouched.
User avatar
nathanj
Posts: 303
Joined: Sat May 28, 2016 12:30 am

Re: Editor Note Destroy Question

Post by nathanj »

Ya, ok. sorry for wasiting your time.

Thanks again though

Nathan
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Editor Note Destroy Question

Post by Tony Li »

It was certainly wise of you to check. That would be a pretty bad thing if it destroyed entire GameObjects.
Post Reply