Skip to content

Commit

Permalink
Bump version to 0.1.61
Browse files Browse the repository at this point in the history
  • Loading branch information
neilsarkar committed Jul 26, 2020
1 parent 17f7a5c commit d2c1377
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
6 changes: 3 additions & 3 deletions Runtime/Navigation/Navigator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ void LoadScreens() {
if (transform.childCount == 0) { return; }

ScreenId screenId = ScreenId.None;
screens.Clear();
foreach (Screen screen in GetComponentsInChildren<Screen>(true)) {
var isValid = Enum.TryParse(ScreenIdGenerator.Sanitize(screen.name), out screenId);
if (!isValid) {
Expand Down Expand Up @@ -229,11 +230,10 @@ public void AddScreen() {
float lastUpdate;
void Update() {
if (Application.isPlaying) { return; }
if (transform.childCount == 0) { return; }
if (transform.childCount == screens.Count) { return; }
if (transform.childCount == 0 || transform.childCount == screens.Count) { return; }
if (Time.time - lastUpdate <= .5f) { return; }
lastUpdate = Time.time;
Violet.LogVerbose($"{name} reloading screens and regenerating enums");
Violet.LogVerbose($"{name} reloading screens and regenerating enums. childCount={transform.childCount} screensCount={screens.Count}");
LoadScreens();
RegenerateEnums();
}
Expand Down
8 changes: 0 additions & 8 deletions Runtime/Navigation/ScreenId.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,5 @@
namespace VioletUI {
public enum ScreenId {
None = 0,
ScreenA = 1,
LogTest = 2,
ButtonPress = 3,
RenameMe = 4,
Renata = 5,
Showhide = 6,
ScreenB = 7,
Supson = 8,
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.neilsarkar.violetui",
"version": "0.1.60",
"version": "0.1.61",
"displayName": "Violet UI",
"description": "State-based rendering with live updates in the Unity Editor",
"unity": "2019.4",
Expand Down

0 comments on commit d2c1377

Please sign in to comment.