Call Function From Static Function? C#

Good Morning, I have been trying to call a function from a static function with out success, I have looked all over the web and would love any help. I do not want the other function Static or else this would be easily solved.

using UnityEngine;
using UnityEditor;
using System.Collections;

[ExecuteInEditMode]

public class Shape : MonoBehaviour {
		
		[MenuItem("Spawn")]
		static void spawn()
		{
		 Create();
		}
		
		void Create()
		{

        	}
}

Non-static functions must be called on instances of the class. Inside static functions, you cannot refer to an instance of the class implicitly like you can in member functions. For example, inside Update, you can call Create because Update is also a member function and in order for Update to have been called, it needs an instance to call it on. When Create is called in Update, the same instance will call Create. In static functions, since you call it on a class, not an instance, there is no instance built into it.

If you don’t want Create to be static (although I don’t know why you wouldn’t want to do that and believe you should reconsider that), you’ll have to either create an instance of a Shape object inside spawn which you can then use to call Create or pass in a shape instance as a parameter.

You need to instanciate an object before you can call member functions.

Static functions are not member functions and so can be called without an object reference.

Think of it this way: normally, the code will automatically insert an invisible this when you call a non-static function. However, static functions have no this to insert at all.

What you will want to do is instantiate it fist. You’ll probably want something more like this:

 using UnityEngine;
 using UnityEditor;
 using System.Collections;
 
 [ExecuteInEditMode]
 
 public class Shape : MonoBehaviour {
         
        public static Shape ShapePrefab;
        
         [MenuItem("Spawn")]
         static void spawn()
         {
            GameObject go_NewShape = Instantiate(ShapePrefab.gameObject);
            Shape NewShape = go_NewShape.GetComponent<Shape>();
            NewShape.Create();
         }
         
         void Create()
         {
 
             }
 }

There’s a much easier way to do this for a class in the current scene:

 [MenuItem("Menu Name/Do Code")]
 public static void Do Code()
 {
    GameObject.FindObjectOfType<MyClass>().MyMethod();
 }