get stuff from C# to Java - need seriouse help

Hi!

I have a problem that cames along becouase we wrote our project first in Java then in C#… and not all code is converted…
The problem is I know C# but I don’t know how to get stuff from my C# class into Java I meant this:

I have a class as public (Instance in C#)

	public static SomeMonoBehaviore Instance()
	{
		if (instance == null)
		{
			instance = FindObjectOfType(typeof(SomeMonoBehaviore)) as SomeMonoBehaviore;
		}
		return instance;
	}

in this Class I have a function like:

	public bool SomePublicBool()
	{
		return someBool;
	}

Now when I use C# code I can check this public bool as follow:

 if (SomeMonoBehaviore.Instance().SomePublicBool())
 {
 }

and now is the question how to make exactly this in Java:

 if (SomeMonoBehaviore.Instance().SomePublicBool())
 {
 }

I hope some of you know booth languages good enought to help wit this issue…
thanks a lot!

Cheers

Java != Javascript

This topic has been covered hundreds of times here on the forums, but here’s a very brief hint:

You may discover the need to locate your C# files such that they are compiled before the javascript files : http://unity3d.com/support/documentation/ScriptReference/index.Script_compilation_28Advanced29.html

After that, it should be pretty darned easy. If not, I’m sure you can find the answers in one of the many pre-existing threads here :slight_smile:

ok works! sorry I missed the fact about the script “positions”

thank you very much!