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

C# error - A namespace can only types and namespace declarations

(edit: when i realized the error and fixed it, it showed another one, could someone please pix this? thank you) I am a newbie to C#, and i do not know what this error is all about, i am trying to edit...

View Article


How to use getcomponent with a namespace?

Hi Im currently making a multiplayer racing game and I need to use the getcomponent code in my script. I am trying to get this script from Unity's car in the Vehicles package that can be downloaded in...

View Article


Audio Source Logic Error for foot steps

So I can get my game to run fine but I run into a problem with the audio. When i have two or more audio sources using the same function on different scripts and objects. The audio will either cut out...

View Article

How to access public variable in namespace

Hello, I am working with Platformer Character 2D from the Standard Assets. In project pane I created a new script with public static variable bool. I want to access this public bool which is in a...

View Article

Custom icons for custom Monobehaviours in custom namespaces

Hi! As answered [here][1] correctly, you can add custom icons for your Monobehaviours by putting an appropriately named icon in the "Assets/Gizmos" folder of your project. This works fine, until I try...

View Article


(SOLVED) Script error getting Object to move

So I am trying to make a plate of food move. When I get this script: function Update() { // Move the object to the right relative to the camera 1 unit/second. transform.Translate(Time.deltaTime, 0, 0,...

View Article

"using UnityEditor;" throws an error?

This is so strange. I've imported an asset from the asset store (Volumetric Lines by Johannes Unterguggenberger), and when I try to build a standalone player Unity throws this error at me: "The type or...

View Article

Error CS0246: Type/Namespace Error

Hi guys, I'm getting this error: error CS0246: The type or namespace name `CharacterMovement' could not be found. Are you missing a using directive or an assembly reference? The script is trying to...

View Article


Can't find EventSystemEditor in Unity 5.1.2f1

I'm trying to create my own editor for a component and I'd like to add events to it. However, I can't extend EventSystemEditor like the API suggests. I'm pretty sure I'm importing the right package...

View Article


Declaring XML Namespace at Runtime

Hi Unity Community! I’m trying to write a script to add nodes to an XML document at runtime however I am encountering issues when trying to define the name attribute of the new node; I would like to...

View Article

Application.LoadLevel ("PlayState"); (and all other Application.X) stopped to...

Hi, Application.LoadLevel ("PlayState"); was working fine, but it suddenly stopped to work. Message error is: "CS0234 The type or namespace name 'LoadLevel' does not exist in the namespace...

View Article

Silly question - Adding to a class (GameObject)?

Is it possible to create my own custom functions in GameObject (or even Mathf)? Like if I wanted to do something like GameObject.GetChildrenObjects(gameObject) and it would do as it suggests, is that...

View Article

Problem with referencing namespaces C#

I want to use Speech Recognition in my Unity 4.6 game. I found that in C# you can use the Windows default speech recognition engine by referencing System.Speech. I tested this in a separate project and...

View Article


Custom names for variables (array-elements!!) in the inspector??

I've been looking and googling for a way to do that for hours now... is there really no attribute or something to do this simple thing - provide a string to be used in place of the variable name (or...

View Article

Asset does not correspond to file location, should be Assets.

Every time I download a project with namespaces, the namspaces are simply the folder name e.g. Scripts but ReSharper wants it to be Assets.Scripts. Should I change every time all the namespaces to...

View Article


Preventing the first person controller from rotating

Hi Unity Community I am trying to prevent the First Person character from rotating via mouse click however I cannot seem to access the appropriate field; how is this supposed to be achieved? I’m...

View Article

Assets/Scripts/PlayerController.cs(10,27): error CS0246: The type or...

I have read all the example scripts and they do not reference a component within the game. The script I am trying to run references the component 'RigidBody' and errors out when trying to test movement...

View Article


Namespces not found though they are listet in references

Hello Everyone, I'm stuck at this problem for a view days and can't find a solution. I installed two versions of Unity, one beeing 32 bit so I can use the Vuforia Framework, one 64 bit for all non AR...

View Article

Using 2 different namespaces

I am using 2 different set of codes that both have their own namespaces. One is for a water emulator and one for my custom ThirdPerson Controller. Now the problem is that i want to create a detector...

View Article

A namespace can only contain types and namespace declarations

![alt text][1] [1]: /storage/temp/58340-螢幕快照-2015-11-18-下午110244.png i don't know where is wrong..

View Article
Browsing all 398 articles
Browse latest View live


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