Quantcast
Channel: Questions in topic: "namespace"
Browsing all 398 articles
Browse latest View live
↧

What are efficient ways to access other scripts ?

Hi, I started to wonder what are the best ways to access other scripts on different gameObjects. I know that Find() is very inefficient, but what about namespaces and static variables ? What advantages...

View Article


CrossPlatformInput class not within the UnityStandardAssets namespace

My Unity scripts require the cross platform input classes. First they were called in the usual way. using UnityStandardAssets.CrossPlatformInput; This worked for a long time. But recently all scripts...

View Article


Reimporting is not happening successfully

My Unity project runs on unity 5.3 and uses the standard asset bundle. The crossPlatformInput scripts are giving many errors. I checked the CrossPlatformInputManager.cs. Here the Namespace is as...

View Article

NameSpace player health

Hi I have that code: using UnityEngine; using System.Collections; using UnityEngine.UI; public class HUD : MonoBehaviour { public Sprite[] HeartSprites; public Image HeartUI; private Character...

View Article

The type or namespace "UnityEngine" could not be found - Can not edit scripts

Hello, I have a problem, in Visual studio there is an error in the first line "using UnityEngine;", which says: "The type or namespace UnityEngine could not be found. I have no idea what to do, I asked...

View Article


OnTriggerEnter is not working ?

OnTriggerEnter is not working when i use the following namespace " UnityStandardAssets.Vehicles.Car" this is my script : using UnityEngine; using System.Collections; using...

View Article

Auto generated default C# script giving error ?

Hello everybody. Something weird is going on. I created a new script on the Assets folder named "2DRaycaster", and then I double-clicked it, to open it in Visual Studio and edit it. The moment it loads...

View Article

error: `AI' does not exist in the namespace`UnityEngine'

I am getting an error regarding a script in Unity 5.4.0b24. Assets/Standard Assets/Character Controllers/Sources/Scripts/AICharacterControl.cs(10,28): error CS0234: The type or namespace name AI' does...

View Article


Tons of " The type or namespace name `Stuff Here' could not be found.

I don't understand why this happens. Suddenly, out of nowhere, i started to get literally hundreds of same type errors. And when i for instance delete the error popping scripts, it just rips out more...

View Article


Returning Values from custom namespaces C#

Hey guys, this is a bit of a throwback to a script that I had asked about maybe a week ago, so apologies if this seems repetitive. I have a number of different scripts that, because of a variety of...

View Article

the type or namespace name "Enemy" could not be found

![alt text][1] [1]: /storage/temp/81650-screenshot-1.png help im trying to make my first gun script, from the Jgn games youtube "how to make a gun in unity" tutorial at the part where he fires the ray...

View Article

Implement Apple TV ODR (On Demand Resources)?

I got quite confused when I tried to copy the code from this Apple TV ODR blogpost into my project [mastering-on-demand-resources-for-apple-platforms][1] The Unity TvOS Platform does not know about the...

View Article

using namespace; vs namespace.some_method_or_class_name

I want to know when to use which, i.e., say if i have a gamecontroller class which will run for the entire course of the game. And, i want to use 1-2 functions from a given namespace (which could be...

View Article


Namespace not recognized

I've been having trouble getting the Windows.Devices.Sensors and CoreMotion namespaces to be recognized. I'm using C# and have never had issues adding namespaces, but I'm unable to access their...

View Article

the type or namespace cannot be found

Hello using UnityEngine; using System.Collections.Generic; using System.Collections; public class newgame : MonoBehaviour { // creates a random degree for each planet public int degreegenerator () {...

View Article


Monobehaviour Update not working in namespace

I've read in a few places that monobehaviour should work inside new namespaces, but i currently cannot get Start/Update and so on to work inside a name space while it is not giving me any errors for...

View Article

Accessing 'un-namespaced' class from UnityStandardAssets.Characters.ThirdPerson

I've never really had to deal with namespaces before, so excuse any ignorance that might be present here. I'm writing a static camera system (kind of like you'd see in the old Resident Evil games) and...

View Article


How using additional namespaces affects performance?

I wonder how adding something along the lines of: using System.Collections.Generic or using UnityEngine.UI affects performance or size of the project. Is it significant? I ask, because I'd like to...

View Article

How do I call a variable from another script? (C#)

Hi, I'm trying to call a variable from another script, this variable is inside of a namespace., so I'm having trouble to archieve this. THE SCRIPT TRYING TO ACCESS THE VARIABLE: using System; using...

View Article

NameSpace Error EnemyHealth Cant Access Other Script.

Hey guys I'm fairly new to unity and was working on a project for school and came across this error The Type or namespace name 'EnemyHealth' could not be found(are you missing a using directive or an...

View Article
Browsing all 398 articles
Browse latest View live


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