Saving or get array of string - PlayerPrefs
Hello world, I would save and get list, using an array (of course), by PlayerPrefs but it doesn't work, or unity doesn't recognize my scirpt, i've a lot af compiler errors. **Please note that I not use...
View ArticleVariables return 0 even after assigning values.
Hello all, I'm trying to get variables *xID* & *yID* of *Sensor* script on *Sensor* gameobject through another *Cube* script on *Cube* gameobject. Although *Sensor* script was able to convert the...
View ArticleMono reflection using HTTPWebRequest and HTTPS with GET
I have a nice download manager that runs in a background thread and works great with both POST and GET requests over HTTPS on every platform but iOS. I'd seen issues reported in the past about iOS and...
View ArticleHow to "get" an item from an ArrayList?
So I have my list: private List[] touchPoints = new List[10]; I'd like to do something like this: float f = touchPoints[1].GetIndex(2).x; How can I do this?
View ArticleGUI Label & KeyCode Doesn't Work
I've been trying to make it so when you press the letter i, the inventory will show up. I wrote a code that doesn't give me any errors, but when I press the letter i, the GUI Doesn't show up here's the...
View ArticleGetting X/Y positions of the rotated Vector3
I need to get the position drawn in red on this image: The position is local vector from BOX trigger object. SO far i have managed to get the global position only. ![alt text][1] [1]:...
View ArticleGet a script by specifying the path?
I need to access functions from a script which is placed in a folder (and I know the path). Is there a way of getting the script as a "MonoScript" by just specifying the path (or in any other way if it...
View ArticleI want some ints stored in a new int right after eachother
I have 9 ints that i want added together but instead of 1+2 = 3. I want them to stand next to eachother like this: 1, 2 = 12 Heres my code. public int item1; public int item2; public int item3; public...
View Articledouble question mark (??) public ControllerParameter2D Parameters{ get {...
using UnityEngine; using System.Collections; public class CharacterController2D : MonoBehaviour { public ControllerParameters2D DefaultParameters; public ControllerParameters2D Parameters { get {...
View Articledisplaying data in gui from a webpage (c#)
hi, is there a clean and easy way for a simple minded n00b like myself to retrieve values from a web page and display it in a GUI.Box for example if a player has x amount of ingame cash how would you...
View ArticleGet GameObject from my prefabs.
so i need to load a GameObject from my Assets/_Prefabs folder I tried **Gameobject.find("Object_name");**, but no luck. I tried **PrefabUtility** , but no luck. I tried **Resources.Load("Object...
View ArticleGet prefab through script
Is there a way to get the prefab from a editor script, so I can change some values on it?
View ArticleHow to get objects with a specific component and store them in an array.
So, i made this code to switch weapons, and all i'm trying to do is get how much weapons the player has, so i know how to set the array, and then, put all weapons into the array, however, how do i get...
View Articlecall a coroutine in properity get/set?
I need to call a coroutine MoveCameras() when I enable my camera from my CameraManger script. So I stumbled upon get/set of properities: public bool enableCamera = true; public bool EnableCamera { get...
View ArticleMathf function on GetKey
Alright now, I am simply trying to make an object go right and left and repeat this action, using Mathf.Sin or Mathf.PingPong, and i have one more little problem. When I run the code in update it works...
View ArticleHow can I get Rigidbody.velocity instead of set it?
How can I GET the Rigidbody.velocity instead of set it? I am trying to make a rocket always face "forward" towards its velocity.
View ArticleCant Get Componet From Script
I am having a small issue using the componet command from my C## script, my current script is javascript and I want the script to add health by using this command inside of my "PlayerHealth.Cs" file....
View ArticleDoes GameObject.FindGameObjectsWithTag("Player") work using photon ?
I am making an AI using c# and photon for unity but it only chases the host and not players that join. Im using GameObject.FindGameObjectsWithTag("Player"); to find all the players in the server and...
View ArticleGetting Variables From An Arbitrary Component?
I am familiar with the basic way of getting components by ASpecificComponent aSpecificComponent = (ASpecificComponent)transform.GetComponent("ASpecificComponent"); aSpecificComponent.anInt = 0;...
View ArticleWhy wont this work? (I've done similar 1000 times fine)
I've done this get component stuff 1000 times and its worked just fine, but its been a while so I don't remember if this is right. I would like it to work without making a public variable for the...
View Article