tried to trim my code down to the most basic, i’m doing this as part of an object pooler.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class test : MonoBehaviour {
public static test Pool;
void testcall()
{
Debug.Log("mmm");
}
// Update is called once per frame
void Update () {
Pool.testcall();
}
}
why isn’t this working, Pool is null but i’m not sure why. I do have this script attached to an empty game object in scene. I wanted to be able to with an object pooler do
Objectpooler.StaticInstance.GetFromPool
but i can’t without the static instance existing
the confusing part is i’m using
as my reference and they seem to have basically this exact code with no problems referencing the static object.