Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# Class instance

public class GameMap : Monobehaviour
{
     private static GameMap _instance;
     public static GameMap GetInstance()
     {
         return _instance;
     }

     void Awake()
     {
        _instance = this;
     }

     ...
Source by gamedev.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #Class #instance
ADD COMMENT
Topic
Name
7+5 =