It's only been 5 days since I started Unity.I'm sorry for the rudimentary content, but could you tell me about the prefabricated content?
Is it normal to create a click event on a button, inspect a script, and then prefabricate that button, and then the event or script disappears?
If prefabricated is a reusable part, I thought scripts would be included in the prefabricated...
Thank you for your guidance.
unity3d ugui
You may not know exactly what's going on, but I guess it's probably because the prefabricated GameObject with the script attached is not included.
If you include a GameObject with a script attached in the prefabrication, such as attaching a script to the button itself or attaching a GameObject with the script to the child of the button (nested), it will be solved.
I have confirmed that the simple project on hand will cause the problem and that the above method will solve the problem.Please try it if you like.
© 2024 OneMinuteCode. All rights reserved.