(For detailed information, please see the link below) https://bitbucket.org/ciitt/unity3d-smartscenechanger
[Smart Scene Changer] is script assets to change scene with showing now loading screen and load any startup contents like WWW or AssetBundle in background.
https://www.assetstore.unity3d.com/jp/#!/content/80061
- (ver2 is NOT compatible with ver1)
- (Code refactoring)
- (Add MIT license text)
- New dialog manager
- Common UI manager
- Scene UI manager
- Loading AssetBundle in runtime
- Controling pause state
- Fix progress bug
- Fix SSC.SimpleReduManager bug
- Fix BuildAssetBundlesWindowPrefs editor reference bug
- Scene change with now loading screen
- Scene change with AssetBundle loading in background
- Scene change with WWW loading in background
- Scene change with IEnumerator in background
- Parallel downloadings
- Show error dialog if an error occurred
- Solve AssetBundle dependencies automatically by manifest
- Solve additive scene in AssetBundle
- Decryption of AssetBundle
- You can override now loading contents
- You can override error dialog contents
Prepare a server for WWW or AssetBundle download. If you don't have any server, there is a server software I created, use below.
https://bitbucket.org/ciitt/simple-send-server
If you don't have any build script, use below.
Tools -> SSC -> Sample Build AssetBundles Window
(you can override [BuildAssetBundlesWindow] script)
(I created this tool for any tests)
Open [SSC Demo Init Scene] and select [SmartSceneChangerSample] object.
Find [SampleAssetBundleStartupManager] script and set parameter values below.
- Ios Manifest File Url (for iOS)
- Android Manifest File Url (for Android)
- Win Manifest File Url (for Windows)
(or override AssetBundleStartupManager script as you want)
Open [SSC Sample Scene] and select [sample www startup] object.
Find [SampleWwwStartupScript] script and set [Url] parameter value (url to image file).
Activate this script.
Open [SSC Demo Init Scene] and play.
[SSC Sample Scene] will be loaded with any loadings.
-
IEnumeratorStartupScript for IEnumerator startup.
See SSC Sample Scene -> sample ie startup -> SampleIEnumeratorStartupScript -
WwwStartupScript for WWW startup loading.
See SSC Sample Scene -> sample www startup -> SampleAssetBundleStartupScript -
AssetBundleStartupScript for AssetBundle startup loading.
See [SSC Sample Scene -> sample ab startup -> SampleAssetBundleStartupScript]
See [SSC Sample Scene -> sample ab scene startup -> SampleAssetBundleStartupScript]
(ver2.1) See [SSC Sample Scene -> sample detail sync ab startup -> SampleAssetBundleStartupAsyncScript]
Override startup managers.
See [SSC Demo Init Scene -> Smart Scene Changer Sample -> SampleAssetBundleStartupManager] for AssetBundle startup.
See [SSC Demo Init Scene -> Smart Scene Changer Sample -> SampleWwwStartupManager] for WWW startup.
See [SSC Demo Init Scene -> Smart Scene Changer Sample -> SampleIEnumeratorStartupManager] for IEnumerator startup.
- Start showing nowloading UI
- Start [UnloadUnusedAssets]
- Start [LoadSceneAsync]
- Start loading all of [IEnumeratorStartupScript(before)]
- Start loading all of [AssetBundleStartupScript]
- (If AssetBundle additive scene was detected, restart from IEnumeratorStartupScript(before)])
- Start loading all of [WwwStartupScript]
- Start loading all of [IEnumeratorStartupScript(after)]
- (ver2.1) If new startup objected are detected, restart new all startups.
- Start hiding nowloading UI
See [SSC Sample Scene -> Runtime AB Loader Test -> RuntimeLoadABScript]
UI object is controlled by [UiControllScript]. Override [UiControllScript] and add it to CommonUiManager or SceneUiManager with UI identifier you wanted.
SSC.CommonUiManager.Instance.showUi("idebtifier", ----);
SSC.SceneUiManager.Instance.showUi("idebtifier", ----);
See [SSC Demo Init Scene -> Smart Scene Changer Sample -> CommonUiManager]
See [SSC Demo Init Scene -> Scene Canvas -> SceneUiManager]
See [SSC Sample Scene -> Scene Canvas -> SceneUiManager]
See [SSC Sample Scene -> Scene Canvas -> SampleUITestScript]
Selectable is used for UI Navigation.
If valid object is set, the object is selected when showing.
Override [DialogUiControllScript] and add it to DialogManager.
See [SSC Demo Init Scene -> Smart Scene Changer Sample -> SampleDialogManager]
See [SSC Demo Init Scene -> Smart Scene Changer Sample -> Canvas -> Dialogs -> Yes No Dialog -> SimpleDialogUiControllerScript]
See [SSC Demo Init Scene -> Smart Scene Changer Sample -> Canvas -> Dialogs -> Ok Dialog -> SimpleDialogUiControllerScript]
DialogManager.Instance.showOkDialog(----);
DialogManager.Instance.showYesNoDialog(----);
SSC.SimpleReduxManager.Instance.addPauseStateReceiver();
See [SSC Sample Scene -> sample ie startup -> SampleIEnumeratorStartupScript]
var pState = SimpleReduxManager.Instance.PauseStateWatcher.state();
pState.setState(SimpleReduxManager.Instance.PauseStateWatcher, bool);
-
Tools -> SSC -> Editor Scene Loader Window
Quick scene access tool in editor. -
Tools -> SSC -> Sample Build AssetBundles Window
A tool to build AssetBundles with encryption.
-
Tools -> SSC -> Set AssetBundle Name Window
A tool to label AssetBundles. -
Tools -> SSC -> Show All AssetBundle Names Window
A tool to show all AssetBundle names. -
Tools -> SSC -> Create Starter Window
A tool to create starter managers.
- [SmartSceneChangerBase] prefab has [EventSystem], so be careful not to be duplicated.
MIT