- Home /
Namespace Functions not being recognized
Hi all,
I feel like I'm missing something super obvious.
I'm trying to make a namespace for my generic functions. I created the following code:
Script 1:
using UnityEngine;
using System.Collections;
namespace TinyTitan {
public class Utilities : MonoBehaviour {
public void Test1() {
}
public string Test2() {
return "";
}
}
}
In any other script I add "using TinyTitan;" and I can reference TinyTitans.Utilities but no follow up methods appear.
Any insight to this would be great.
Thanks much!
Jeff
Did you create an instance of the Utilities class ? I think you might want a static class if you want to be able to Utilities.Test1()
perchik that was it. I needed to make the sub functions static then I could reference them. Thanks much!
If you want to post it as an answer, I'll select it.
Cheers Jeff
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
error CS0246: The type or namespace name `List' could not be found. 1 Answer
Namespaces usage recommendation 1 Answer