- Home /
Question by
DynamicPrgm · Jan 22, 2014 at 01:14 AM ·
namespace
Using Namespaces?
I am stuck. I need to know how I should create a namespace of my own and use it in another script. How would I do this?
Here is a simplification of what I have that doesn't work.
//script a:
using UnityEngine;
using System.Collections;
namespace Enemy {
public class EnemyController : MonoBehaviour {
string name;
}
}
//script b:
using UnityEngine;
using System.Collections;
using Enemy;
public class AI : MonoBehaviour {
EnemyController enem;
enem.name = "geoff";
}
Comment
Answer by getyour411 · Jan 22, 2014 at 01:20 AM
You don't want to use a Namespace, this is much simpler.
Follow this http://unitygems.com/script-interaction-tutorial-getcomponent-unityscript/
Your answer
Follow this Question
Related Questions
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Problems with scripts 0 Answers
Animated Texture Offset 1 Answer
[HELP] Rotate Bullet Script 0 Answers