Quantcast
Channel: Questions in topic: "static variables"
Browsing all 84 articles
Browse latest View live
↧

How to access static members in the watch/immediate window when debugging...

I have been searching for an answer to this for a while and a great one would be really appreciated. Let's take the following scenario: I am in MonoDevelop on OSX, I placed a breakpoint in a class and...

View Article


Force reset static variable

After googling a bit, I've tried some methods to try to reset a static variable, but none of them want to work (Sure I'm doing some wrong steps). First I tried to Reset the value to 0, both via Start,...

View Article


Environment reset after plugin import kill all static variables.

Hey I'm trying to realize installer with settings in Editor for my own plugin. It should ask user about required parts of my plugin, download some zip and unitypackage files and import them to a...

View Article

How to reset a static variables on loading a scene...

How to reset a static variables on loading a scene [SceneManager.LoadScene(NameofScene)]. I tried to initialize variables in Start function or in Awake function but i find bad result.

View Article

Sound Clip isn't playing when triggered.

I want my kill streak sound to be triggered when the KSsound value reaches 250. However the sound doesn't play when the value reaches 250. using System.Collections; using System.Collections.Generic;...

View Article


Static variables and Design Fundamentals (singleton)

So, I've been pondering this question for quite some time as I am a self taught developer, and outside the scope of scripting inside of Unity, my knowledge is pretty lackluster in terms of software...

View Article

Static Variables

At first, I have read all the static variables post on forum and questions. I am using 2 scripts - 1 that is Running and 1 that is Character Motion In the first script I have declared a static variable...

View Article

Using variables and classes of C# in Javascript?

Hello, I have a set of Javascript classes that each work on a number of static variables. The problem is that some of these static variables are obtained by calling a function which my friend...

View Article


Asign value of Attribute to static variable

Hi everybody, I'm attaching my Script "VisibilityScript" to some GameObjects with the following Editor-Script: class MyPostprocessor extends AssetPostprocessor { function...

View Article


What is the best way to implement Game States?

So I am trying to create an RPG, and off the top of my head I will need about 4 different game states that changes what button input does. The first would be the normal state (when your just walking...

View Article

Reset static variables

How can I reset a static variable? For my game i have a reset button however it does not reset my static variable. my static variable is: public static int Score = 0; and it is being called at: void...

View Article

Static Variable Doesn't Change ?

Hello Unity Community. I'm very anixous about a code :S There's a code i translate form C# to .js #pragma strict /////////////////////////////////////////////////////////// var startTime : float; var...

View Article

Static References to Game Objects: Bad Idea?

Hey guys, I'm relatively new to Unity, but I've been programming for some time now. Some friends and I are building a game and I had the idea of making a central manager that has references to certain...

View Article


Design Advice: Power Up System (static variables?)

hey there, I have a game in progress in which the player can fly around in 3d space and shoot weapons. I have various variables for the player like: movement speed, rate of fire, damage, hit points...

View Article

Static variables not staying

I'm creating a script so a player knows when they collect 5 coins in a row. For some reason, if there is too much time between coin collection Unity resets my variable back to 0...and I'm not sure what...

View Article


How to reset all static variables.

Hi, I have hundreds of static variables across dozens of scripts. In fact 1 script has almost 200 in, and there are 71 scripts. I am looking for a simple bug free way to reset all of these static...

View Article

Why are my static member variables null inside other classes/scripts?

In my application, there is a need for all of my strings to be multilingual. My first plan was to import key-value pairs as text assets and parse these per individual scene. Being rather new to Unity,...

View Article


how to keep static variables or 2d array value

I made a tilemap editor. Tilemap editor can make or edit 2d tiled terrain to use static values and 2d array. 2d array have terrain data. But when i play my game in unity editor, or updating my scene...

View Article

Multiple GameObjects accessing the same script, when script destroys game...

I'm making a shield system for the enemy ships. I have all of the shields running off of the same shield script, which seems to work fine other than when it destroys the game object. All of the ships...

View Article

Making my variable global.

I was trying to change the sprite image of my character from another scene. I made two scripts 1. Sprite_Img.js 2. changeTheSprite.js I have attached Sprite_Img.js to my character object and...

View Article
Browsing all 84 articles
Browse latest View live


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