Jump to content
  • Advertisement
Gautti

C# Editor Script use in outside the Editor folder in Unity

Recommended Posts

Hi, Anybody knows how to use the reference of Spine.Unity.Editor in outside the Editor folder in Unity. Because right now I have to access method of spine editor script in MonoBehaviour. But it gives me a build time error. so what should I do for working fine ?

Share this post


Link to post
Share on other sites
Advertisement
Posted (edited)

You can't use Editor Only Functions outside the Unity Editor, nor in Standalone Builds. These are Editor Only (as the name says) and mostly point to Editor Functions like Asset Database or Editor UI.

By the way it dosen't matter where in your Asset direktory the code lives I think

Edited by Shaarigan

Share this post


Link to post
Share on other sites
On 3/22/2019 at 8:50 PM, Shaarigan said:

 

 

On 3/22/2019 at 8:50 PM, Shaarigan said:

 

Thank you Shaarigan

Share this post


Link to post
Share on other sites

Why would you even have an editor script inheriting from MonoBehaviour anyway? MonoBehavior is basically everything but the Editor. That's probably the source of your build error.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!