I have 2 Singleton example scripts (A and B)
Is there any difference in the two?
Is one way better than the other, perfomance or otherwise?
Please explain
Singleton example A
Writing Singletons, Help
Is there any difference in the two?
Is one way better than the other, perfomance or otherwise?
Please explain
Singleton example A
Code (CSharp):
- using UnityEngine;
- using System.Collections;
- {
- public int score;
- private static gameManager mySingleton;
- public gameManager Instance
- {
- get
- {
- return mySingleton;
- }
- }