
How to find child of a GameObject or the script attached to child ...
You can get other children by providing index number of the child GameObject such as 1,2,3, to the GetChild function. and if its a child of a child in the original gameobject? would I just have …
unity game engine - Accessing a variable from another script C
I have even read everything in unity website but I still can’t do it. I know how to access another object but not another variable. This is the situation : I’m in script B and I want to access the …
Sending http requests in C# with Unity - Stack Overflow
How can I send HTTP GET and POST requests in C# with Unity? What I want is: send json data in post request (I use Unity serializer, so no need in new one, I just want to pass a string in …
How do I loop over all Assets folders and sub folders and get to a …
So if I have a folder with the 10 prefabs and under it 30 sub folders with more 200 prefabs then get all the folders and prefabs and add a component/s to all the prefabs in all folders.
Unity - How to stop Play Mode in case of infinite loop?
Actually I wasn´t able to do anything else with Unity until I restarted it. My question is, does anyone know how to stop the Play Mode in Unity gracefully? Is there any shortcut or some …
How do I get autofill suggestions from unity in Visual Studio?
I am following a beginners' unity tutorial, and the guy I am watching has special colours for different types of text. (Orange for vars, blue for floats etc.) He also has autocomplete …
What's the equivalent of GetKey in the new unity input system?
There is no equivalent! You have to Bind all Inputs to events and then process the inputs in the methods you assign to these events. This is because the new input system does not directly …
c# - Get name of current animation state - Stack Overflow
12 How can I get the name of the current state in a layer on my Animator component? I realize that I can compare the name with GetCurrentAnimatorStateInfo(0).IsName("statename") but I …
In Unity, how can I pass values from one script to another?
Dec 15, 2012 · 31 In Unity, I want one object to have a falling speed variable that all the other objects can access. For various reasons, I can't use the inbuilt gravity for what I'm trying to do. …
get the orientation of the device with unity3d - Stack Overflow
Im making my first 2d game with unity and im trying to do a main menu.