Quantcast
Channel: Questions in topic: "get"
Browsing all 215 articles
Browse latest View live
↧

C# public parameter with custom get/set doesnt shown in the Inspector

private bool _showFps; public bool ShowFps { get { return _showFps; } set { _showFps = value; GameObject.FindGameObjectWithTag("EnvironmentFps").GetComponent().FpsEnabled = value; } } _showFps...

View Article


Get a numeric value from a website

Hey Guys, I am trying to get a value from a website. 3142 The value being 3142. I have been successful in accessing the website. I have also been successful in grabbing a value using "string search"....

View Article


Getting a value from Assigned script

Hello I need a help. I am developing a game and I am having such a big issue. I have assigned one script on button, This button is upgrade, on click it increments int by one ( i++). But I dont know,...

View Article

Texture2D.GetTextureRawData doesnt work outside the editor ?

When i try to use it on build, i get an array with 0 length, works fine on editor.

View Article

C sharp get and set problem: "name doesn not exist in the current context

Hello, i got a problem with my code. I tried to make a get/set function for my life variable, but the get, set and value is always marked as red, with the information: "The name get does not exist in...

View Article


Get the position of a particle on collision

Hi everybody, I have a scenario where I have an object hit by a drop of water (particle). My particle name is "drop1". I would need to know and print the x y z position of the drop1 on the moment of...

View Article

Variables 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 Article

Getter 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 Article


Get 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 Article


Get 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 Article

Since 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 Article

UI Button color

How can I get the color a UI Button has in the moment?

View Article

Windowed 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 Article


WWW 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 Article

Determine 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 Article


Image may be NSFW.
Clik here to view.

I 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 Article

Joystick 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 Article


DecoratorDrawer 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 Article

How 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 Article

Get 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 Article
Browsing all 215 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>