the vector3 line gives me an error “cannot convert from vector3 to transform.” the ide suggests making a method in which to put the code.
i have an actual prefab object called inputbox, which is i’m assuming required for this code operation. i’m trying to learn to be a better C#/Unity coder, so if you can give me conceptual advice along those lines that would be very helpful. i don’t really understand the code i used, but i would like to get to the point where i do understand it.
Check out all the available overloads for Instantiate. If you want to provide a position you also need to provide a rotation. Providing two arguments makes Unity think that you’re trying to pass in a parent.
okay Kelso, that worked. Anne, i will look at the tutorial. now i’m having an odd problem of the canvas lines showing at run time. what can i do about this? i googled but no luck.
edit: also, i have a script that’s supposed to store the value from an input field in a variable and then delete the prefab it’s a part of. this all happens after the enter button is pressed. currently, the script doesn’t work at all. and i can’t get at the inputfield to drag it onto the gameobject with my store and delete script (since i’m instantiating a clone of the prefab, and i can’t get at the intput field within the prefab). is there a way to do this?