-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
200 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
## [1.1.0] | ||
|
||
### Added | ||
- Global `RSM` settings | ||
- Automatic initialization at startup | ||
- Canvas sort order | ||
- Don't destroy when scene changed | ||
- Changelog | ||
|
||
### Changed | ||
- encapsulated public `RSMCore` parameters | ||
- improved code architecture |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,25 @@ | ||
#if UNITY_EDITOR | ||
using RightStatsMonitor.Core; | ||
using UnityEditor; | ||
using UnityEngine; | ||
|
||
namespace RightStatsMonitor.Editor | ||
{ | ||
public class InstantiateStatsMonitor : MonoBehaviour | ||
internal sealed class InstantiateStatsMonitor : MonoBehaviour | ||
{ | ||
[MenuItem("Tools/RightStatsMonitor/Settings")] | ||
private static void OpenRsmSettings() | ||
{ | ||
Selection.activeObject = RsmSettings.Instance; | ||
} | ||
|
||
[MenuItem("Tools/RightStatsMonitor/Add to scene")] | ||
private static void InstStatsMonitorInTheScene() | ||
{ | ||
if (GameObject.Find("RSM")) EditorUtility.DisplayDialog("RightStatsMonitor is already in the scene", | ||
if (FindObjectOfType<RSMCore>()) EditorUtility.DisplayDialog("RightStatsMonitor is already in the scene", | ||
"", "OK"); | ||
else Instantiate(Resources.Load("RightStatsMonitor")).name = "RSM"; | ||
} | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!114 &11400000 | ||
MonoBehaviour: | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_GameObject: {fileID: 0} | ||
m_Enabled: 1 | ||
m_EditorHideFlags: 0 | ||
m_Script: {fileID: 11500000, guid: e01fa188869148b4a03249774d8c64ab, type: 3} | ||
m_Name: RSM Settings | ||
m_EditorClassIdentifier: | ||
targetFrameRate: 60 | ||
fpsUpdateTime: 500 | ||
ramUpdateTime: 1 | ||
initializeAtRuntime: 1 | ||
dontDestroy: 1 | ||
canvasSortOrder: 1000 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using UnityEngine; | ||
|
||
namespace RightStatsMonitor.Core | ||
{ | ||
internal static class RsmInitializationProcessor | ||
{ | ||
[RuntimeInitializeOnLoadMethod] | ||
private static void InitializationProcessor() | ||
{ | ||
var settings = RsmSettings.Instance; | ||
|
||
if (settings.InitializeAtRuntime) | ||
{ | ||
if (GameObject.FindObjectsOfType<RSMCore>().Length > 1) | ||
{ | ||
Debug.Log("RSM is already added to scene"); | ||
return; | ||
} | ||
GameObject.Instantiate(Resources.Load("RightStatsMonitor")).name = "RSM"; | ||
} | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.