Skip to main content
9 events
when toggle format what by license comment
Aug 27, 2018 at 9:15 vote accept Daniel Lip
Aug 27, 2018 at 8:27 answer added wondra timeline score: 4
Aug 27, 2018 at 7:50 history edited Daniel Lip CC BY-SA 4.0
deleted 2456 characters in body
Aug 27, 2018 at 6:00 comment added Daniel Lip @arielsan The code the first code with the GUILayout.Button is inside OnGUI and in EditorWindow type script. But the main goal is to check if object exist in the hierarchy not any object but only those in the selection List. Or in the PlayerPrefs. If one of them is missing not exist then enable true the button to be able to recover the object/s.
Aug 27, 2018 at 5:58 comment added Daniel Lip @arielsan The idea is to make kind of Undo button for deleting object/s if by accident or if I deleted and want to bring it back. So after saving the selected objects to the PlayerPrefs I want that when I click the button it will re instantiate the deleted objects if I deleted some of them. So I need to check if this objects exist or not and only then to enable/disable the button.
Aug 27, 2018 at 5:54 comment added Daniel Lip @arielsan I updated my question edited with the code. What I'm doing is in the class TransformSaver.SaveTransform I'm saving the selection of gameobjects to PlayerPrefs. And I want that if I deleted a GameObject in the Hierarchy for some reason and this GameObject is in the selection and also saved to the PlayerPrefs when I click the button "Undo last selection if deleted" re instantiate the deleted object. It's all working but the part of checking if the object hav been deleted or not. (Exist or not ).
Aug 27, 2018 at 5:51 history edited Daniel Lip CC BY-SA 4.0
added 763 characters in body
Aug 27, 2018 at 0:38 comment added arielsan Can you explain what are you trying to achieve? I didn't get it by reading your example. Are you trying to check if a GameObject you have in a cached list is still valid?
Aug 27, 2018 at 0:00 history asked Daniel Lip CC BY-SA 4.0