anhpham / sssystem Goto Github PK
View Code? Open in Web Editor NEWSS-System for Unity3d: Scene & UI Manager!
License: MIT License
SS-System for Unity3d: Scene & UI Manager!
License: MIT License
In my app, OnShow() method of SSSController is called before Awake(), Start() methods so I'm getting null reference error.
( I get a reference to a gameobject in Awake() and use the gameobject in Start() and OnShow()).,
I put logging in your demo app to make sure, then OnShow() is called after Awake() but before Start().
using UnityEngine;
using System.Collections;
public class DemoScreen1 : SSController
{
public void OnNextButtonTap()
{
SSSceneManager.Instance.AddScreen("DemoScreen2");
}
public override void Awake()
{
Debug.Log ("Awake *********************************************************");
base.Awake ();
}
public override void Start()
{
Debug.Log ("Start *********************************************************");
base.Start ();
}
public override void OnShow()
{
Debug.Log ("OnShow *********************************************************");
base.OnShow ();
}
}
Please fix it so the order is always Awake(), Start() then OnShow()...
Thanks.
Hi there,
Let me report a weird behavior I found with Unity 5.5.
Although the name of the gameobject is updated in Hierarchy of UnityEditor with the code above, it (the name of the gameobject) is somehow NOT saved internally so SSSystem calls SSApplication#OnLoaded with the gameobject having its old name.
Then it causes "KeyNotFoundException: The given key was not present in the dictionary." at the following code.
Thanks.
Everytime when I open a scene attached SSSceneManager.cs in Unity Editor, SSEmpty.unity is added to Build Settings so It ends up with the full of SSEmpty.unity scenes.
At line 1931 of SSSceneManager.cs, string emptyScene = SSFile.GetPathTemplateFile("SSEmpty.unity");
The directory separator in the emptyScene is (backslash) on Windows OS but one in the scene in EditorBuildSettings.scenes is /(slash) even on Windows OS.
So "if (scene.path.CompareTo(emptyScene) == 0) { return; }" is always failed on Windows OS and SSEmpty.unity is added to the Build Settings.
plz do something like emptyScene = emptyScene.Replace('', '/'); at line 1932 to normalize.
Thanks for this great framework !
Hi there,
Unity's official asset, AssetBundle Manager, supports loading a scene from AssetBundle by something like 'yield return StartCoroutine( AssetBundleManager.LoadLevelAsync ("test", "sample", false));'.
https://www.assetstore.unity3d.com/jp/#!/content/45836
Do you have any plans to support AssetBundleManager.LoadLevelAsync(...) to load a scene in SSSystem ?
I wish you will...please :)
Cheers
I'm kinda wondering where I should put codes to clean up resources used in my popup windows and screens.
I used to disconnect a database connection in the OnDisable method of a derived class of SSController (used as a popup)
but found out the memory was leaking.
That was because the OnDisable method never gets called even though the popup is closed or no matter IsCache flag is true or false.
Thus, I tested which methods are called when they're opened, closed with the IsCache flag is true or false.
โ Opening a popup window using SSSceneManager#PopUp method.
** SSController.IsCache = true
** SSController.IsCache = false
Summary
โ Opening a screen using SSSceneManager#AddScreen method.
** SSController.IsCache = true
** SSController.IsCache = false
Summary
So, only Awake, OnFocus, OnShow and OnHide methods are always called in all cases,
are they the right places to put initialization and cleanup codes you recommend ?
Hi there,
This is a feature request.
I'd like to have a method of SSSceneManager which returns a scene name currently shown on the display and hopefully its state (currently shown, closing, loading, preparing to show or something else)
Thanks in advance.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.