issues Search Results · repo:UnityCommunity/UnitySingleton language:C#
Filter by
10 results
(70 ms)10 results
inUnityCommunity/UnitySingleton (press backspace or delete to remove)All links that refers into examples are broken because Samples folder renamed into Samples~ for some reason. I dont know
what intend to rename thus i will not make pr for change because i dont know what ...
lolipodass
- 1
- Opened on May 11
- #19
I think it s needed to unsubscribe from events in OnDestroy to prevent memory leaks, such as:
private void OnDestroy()
{
if (StatsManager.Instance != null)
{
StatsManager.Instance.OnStatsChanged ...
bug
KamilDev
- 1
- Opened on Feb 28
- #17
Hi,
whenever I enter play mode and any of my script is trying to call something from singletons, whole unity crashes without
any error log.
Is there any limitations which I would need to know before ...
janvacek
- 2
- Opened on Apr 27, 2024
- #11
Maybe it s better to have a singleton class which is not extended from Monobehaviour. And it can be used to add some
class to manager global data or implement data.
fcmz
- 1
- Opened on Nov 28, 2023
- #10
Add Unity Package Manager setup instructions and include package.json file.
hasanbayatme
- 1
- Opened on Nov 27, 2023
- #7
In some cases we should use this pattern, it differs from the traditional Global singleton pattern , the purpose of
Scene Singleton Pattern is to ensure that there is only one instance of the class in ...
starryforest-ymxk
- Opened on Nov 27, 2023
- #5
protected virtual void Awake() {
if (_instance == null) {
_instance = this as T;
DontDestroyOnLoad(gameObject);
}
else {
Destroy(gameObject);
}
}
The Awake() function ...
enhancement
neo-mashiro
- 2
- Opened on Dec 21, 2020
- #4
Thanks for the code, I believe it could be further enhanced to support editor mode, like the following:
using System.Diagnostics.CodeAnalysis;
using JetBrains.Annotations;
using UnityEngine;
namespace ...
enhancement
aybe
- 3
- Opened on Mar 8, 2019
- #2
protected virtual void Awake()
{
if (instance == null)
{
instance = this as T;
DontDestroyOnLoad(gameObject);
}
else if (instance != this) ...
question
lexnewgate
- 3
- Opened on Sep 30, 2018
- #1

Learn how you can use GitHub Issues to plan and track your work.
Save views for sprints, backlogs, teams, or releases. Rank, sort, and filter issues to suit the occasion. The possibilities are endless.Learn more about GitHub IssuesProTip!
Press the /
key to activate the search input again and adjust your query.
Learn how you can use GitHub Issues to plan and track your work.
Save views for sprints, backlogs, teams, or releases. Rank, sort, and filter issues to suit the occasion. The possibilities are endless.Learn more about GitHub IssuesProTip!
Press the /
key to activate the search input again and adjust your query.