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

How 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


The use of {get;set;}

Could someone explain what this code below does and why haven't we used set; instead? private Material curMaterial; Material material { get { if (curMaterial == null) { curMaterial = new...

View Article


Are there differences between initializing at start and at declaration part

What are the differences between private Rigidbody rb { get { return GetComponent (); } set { rb = value; } } and private Rigidbody rb; void Start () { rb = GetComponent(); } They do pretty much the...

View Article

How to GET and parse data from website?

I am new at this and I do not know how to get info from site and show it in UI. I have tried using plugins but do not know how to. I want to get the numbers showing on the site which are constantly...

View Article

Get variables from an editor script through a regular script

Is there a way to get the variables in an editor script from a regular script? For example: public class ExampleEditor : Editor { float a = 5; } and then in another script I get the value of a. Thanks!

View Article


[C#] StackOverflow when obtaining bool-state

Hey folks, so let me begin by shortly describing what I want to do, then let me introduce you to my problem. So w/o further ado: I want to re-make my old escape menu, I did back in the beginning of my...

View Article

Error CS0177 - "GameManager does not contain a definition for 'GetPlayer'...

I have been presented with this in my PlayerShoot Code. Error CS0117: 'GameManager' does not contain a definition for 'GetPlayer' (CS0117) (Assembly-CSharp), Here is my code, thanks for looking :)...

View Article

Get keyframe values of animations via script

Hi, does anyone know if it's possible to get keyframe values of animations via script? ![alt text][1] For instance I want to get the value of the Rotation.Z that you can see in the image. Would that be...

View Article


if statement in a get function

So I'm working on a project with a camera where i have the camera but other team members don't so i have 2 different object groups 1 virtual and 1 that works with the camera. So I'm trying t make a...

View Article


When i use Fixed Update rigidbody get null...i don't know why .help...

![alt text][1] [1]: /storage/temp/98272-fixedupdate-error.jpg

View Article

Destroy on load/Properties Issue

So I have been trying and trying to resolve this issue. Basically the integer value for the color is assigned to theUI script in one scene and It is defiantly assigned. Next scene the Material changer...

View Article

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 Article

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

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