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

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

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


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

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


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

Help with GetType().GetField().GetValue()

Hello People! I've find a solution to read variable values from a string, but my code does not work... its have error all time, what I'm missing? or What is wrong?...

View Article


Get sprite of Tile

How to get sprite of tile at *x*,*y* position in tilemap? I see only one way: `TileBase.GetTileData()`, but it requires `ITilemap` argument, while i have only `Tilemap`. Maybe there's better solution...

View Article

how to set a value in one script and call it in another? (c#)

here is the issue, i want to have 3 things happen, thus 3 scripts (if it can be done with fewer, that would be great). and it is not working like it should. 1. have the player trigger the `Trap` 2....

View Article

Modify Built-In Class Variables Get/Set functions

Hello, I was wondering whether it might be possible to change the Get/Set functions of variables of built-in unity classes. More precisely I want to change the get/set properties of Text components to...

View Article
Browsing all 215 articles
Browse latest View live


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