Answers for "unity how to get a script that is in Editor folder"

C#
0

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());
     }
 }
Posted by: Guest on February-01-2021

Code answers related to "unity how to get a script that is in Editor folder"

C# Answers by Framework

Browse Popular Code Answers by Language