0
votes
2answers
7 views
What are the Syntax Differences in C# and Javascript?
Although the Unity Scripting page gives an overview of the differences in C# versus Javascript, it isn't comprehensive. I have run into several places where a tutorial in Javascrip …
0
votes
3answers
65 views
Programming WaitForSeconds
Just out of curiosity (I'm learning yield and unity scripting), would it be possible to implement WaitForSeconds in Javascript? How would you do it?
What about C#?
EDIT:
Ok, it s …
0
votes
0answers
34 views
Animation rotate with Ani.Mate
Hi,
I'm using AniMate in C# to do some animation in script. I only have some problems with rotation.
This is what I did:
Hashtable props = new Hashtable();
props.Add("position", n …
0
votes
1answer
106 views
C# Instantiate Problem
I rather new to Unity and am a little confused.
I have a spawn script attached to the main character that spawns a zombie at a random place every x seconds. The random places are …
3
votes
3answers
92 views
Game architecture
Hi,
I'm currently thinking about the Architecture of my new Unity-Game. I'm struggling with 2 options:
1) Create GameObjects with the Editor for Entities like Player, Enemy, Item …
1
vote
1answer
94 views
Error: “Pointers and fixed size buffers may only be used in an unsafe context.”
Is it possible to use Mathf.SmoothDamp in C#? I've seen a number of Unityscript examples, but attempting to use the function in C# with an explicit reference to the "currentSpeed" …
5
votes
6answers
1k views
The type or namespace ‘var’ could not be found (in C#)
Does unity support the C# keyword var and if not are there plans to support it?
EDIT
I did some research and found that mono seems to support three versions of C#: 1, 2 and 3. I …
1
vote
2answers
184 views
“Can’t find namespace” - accessing Javascript from C#
I'm trying to call a function or variable from a JavaScript in a C# class.
I've moved the JavaScript file into the Standard Assests folder but I still get a "can't find namespace" …
0
votes
1answer
60 views
What conditional compilation symbols are available across each version of Unity?
Is there a full list of conditional compilation symbols available in any of the Unity documentation, or anywhere else?
Currently we are aware of the UNITY_IPHONE symbol, and there …
0
votes
1answer
71 views
How do i keep a static variable local to a client instance (c#) ?
I have a connection script, it takes a "public static" variable as a players name. Another script uses that variable to display the players name above it head. BUT when a new playe …
2
votes
2answers
97 views
does the generic version of findobjectsoftype for c# work
the generic version of findobjectsoftype as shown here --> http://unity3d.com/support/documentation/ScriptReference/Object.FindObjectsOfType.html --> does not seem to work as docum …
0
votes
1answer
181 views
Mouse Camera, Camera Mouse
Right. I have tried asking many many people how to do this script and no one seems to get what it is I mean. Basically I want this to be a valid script
function Update () { …
0
votes
2answers
109 views
What C# predefines are recognized by Unity?
I've tried looking through the Unity documentation, and I have yet to find a listing of C# predefines that Unity recognizes. Reading through the forums and such, I've found UNITY_ …
0
votes
1answer
109 views
Picking a language…
I am new to unity and have been going through the reference guide and the scripting reference and as many examples as I can find. I am currently noticing that most of the examples …
10
votes
2answers
788 views
How do I use Yield in C#?
How does one use yield in C#. It behaves differently then the Javascript version of yield.
I was trying to convert this Javascript example to C#. It doesn't seem to call the corfu …