Loading a sprite from resource folder
Hi all, from learning from below video i got stuck while adding sprites (at 15:30): https://www.youtube.com/watch?v=OxObASeB05I When i try to include sprites (using set get and Resources.load) sprite...
View ArticleHow do I post a cURL request from Unity?
I am considering implementing a system like [Gumroad][1] for license administration in my end software but to communicate with it's API I need to send cURL commands such as: curl...
View ArticleGet score from list?
hey gang trying to display scores from my list, should be a simple thing haven't been able to get it to work was wondering how i can get it. however its not displaying anything in my text. :( should be...
View Articlehow do i get property by name out of an object?
so i have this class for example: public class Sounds : Monobehaviour { public AudioClip Click1; public AudioClip Click2; public AudioClip Click3; } Now, i wanna get one of the audioclips by name...
View ArticleHow to get variable by name(string typed in inspector) in array with index...
Hi! And sorry for my eng. I just learning to code and stuck with that problem - I have few buttons with some info about cost and level of selling properties. Each of them have next code using...
View ArticleHTTP GET Method in C# Unity 3D - How to target specific text or header
Hi everyone, I'm currently new here in Unity community so please go easy on me. I have problem with WebRequest in Unity its working but catches all html tags, meta date ext. So my question is is there...
View ArticleGetter and Setter Question!
Hi Unity Forums! I just stumbled over Csharp getters and setters for the first the ever, as someone used them in a tutorial for creating a healthbar. I have a little bit of background using Java, and...
View ArticleGet a value from another script
So, I have PlayerController scirpt like in the Roll-a-Ball tutorial (modified to 2D, and full of other things) It has a score system too, it works fine, adds +1 point when colliding with objects. I...
View ArticleGet position for each Gameobject (in array) ?
Hello, I am making a game and I have two scripts (s_PlayerControl for the player, and s_EnnemyControl for the enemy). My enemy is a prefab who spawn regularly. I try to get the position of each clone...
View ArticleSince my enemies are in a prefab they don't lose health
Hello guys ! I am making a game, and I have a player you can translate on enemies to kill them but since the foes are instantiate with a prefab and a spawnpoint I can't hit them. Maybe because the...
View ArticleWindowed Unity program. Getting Color from Desktop.
Is there any way I can get a pixel color from the desktop? I'm wanting to create a unity program that can run in windowed mode (for dual screen computers) it can be set to the side and the user can...
View ArticleWWW get files name to a folder
Hi, how can I get the names of files in a folder? Now i use this: string[] files = Directory.GetFiles(url); But if I wanted to point to a folder online? Thanks
View ArticleDetermine which player pressed key
So basically what I have is a script attached to one of my UI elements, that is supposed to activate another UI menu while simultaneously deactivating the first person player when a key is pressed. The...
View ArticleI cant get response json from rest call in Unity
Hi all, I had a problem while using www class for rest calls. I wrote the following code. void Start () { WWW www = new WWW ("http://ip.jsontest.com/"); StartCoroutine(WaitForRequest (www)); } private...
View ArticleJoystick DPad axis to bool
Hello, I want to have a class in the inspector to debug those variables. I have problems on the get/set method in the declarisation section. Is there a way on how to set them at runtime without using...
View ArticleDecoratorDrawer javascript examples
Hey there, the [documentation for DecoratorDrawers][1] has no javascipt equivalent to the C# code. I'm having trouble translating this line: get { return ((ColorSpacer)attribute); } I've read that you...
View ArticleHow do I conditionally instantiate gameobject in a public class array?
i have a class called, [System.Serializable] public class EnemyInformation{ //inside are public variables like public int enemyID; public enemyName; } I created another script that inherits...
View ArticleGet y position from another game object and then set the value to a Text UI
How do you do this!? Sorry, I'm a newbie. More like noobie. Anyway, SITUATION: Player jumps up an endless vertical platform to stay above the ground. QUESTION: I want to state the distance of player...
View ArticleHow to get a Line Renderer startWidth / endWidth values ?
Hello, I'm shooting a laser as a Line Renderer and I would get its startWidth and its endWidth values in order to save them for later. Unfortunately, I saw that they only seem available to set, and not...
View Article