unity how to get a script in editor folder code example
Example: unity how to get a script that is in Editor folder
using UnityEngine;
namespace MyNamepace //in Editor folder
{
public class myClass
{
public int Add(int int1, int int2)
{
return int1 + int2;
}
}
}
script outside of editor folder:
using UnityEngine;
using MyNamespace;
public class Test : MonoBehaviour
{
public void Awake()
{
int1 = 2;
int2 = 2;
int result = myClass.Add(int1, int2);
print(result.ToString());
}
}