You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 22, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+7-39Lines changed: 7 additions & 39 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
4
4
# Multi-Scene
5
-
> Version 0.1.3
5
+
> Version 0.2.0
6
6
7
7
8
8
A library to help developers create Unity games that split elements of the game into multiple scenes.
@@ -19,48 +19,16 @@ A library to help developers create Unity games that split elements of the game
19
19
- More scene loading options
20
20
- Additional attributes for more flexiability
21
21
22
-
### Limitations
23
-
- At present scenes don't wait for the last group to be fully unloaded before the new group is loaded in. Be aware of this when using this system in your games.
24
-
25
22
## How To Install
26
23
Download the latest version of the project via the packages section of this repo & un-zip the downloaded files. Then either:
27
24
1. Run the .unitypackage and proceed to follow the steps in import window in Unity
28
25
2. Open your Unity project, right-click in the project window and select the "Import Custom Package" option. Select the package and follow the steps in import window
29
26
30
-
## Basic Setup
31
-
The setup your project for Multi-scene, choose a scene to be the main or active scene. This is known as the ```base``` scene which is the scene the system loads first and the default scene for any object spawning, referencing etc. Its recommended for this scene to be a manager scene for your game or something similar, but it can just be an empty scene with no other functionality if you wish.
32
-
33
-

34
-
35
-
Then follow the following steps:
36
-
1. Add the ```MultiSceneManager``` script to a gameObject in the ```base``` scene
37
-
2. Create a ```Scene Group``` asset via the "Create Asset Menu" and add the name of the base scene to it
38
-
39
-

40
-
41
-
3. Add the names of any additional scene in the additive section of the asset
42
-
43
-

44
-
45
-
4. Assign the asset to the ```MultiSceneManager```
46
-
This is all the setup the package needs to run a multi scene setup.
47
-
48
-
49
-
50
-
### Cross Scene Referencing
51
-
Unity has no native support for referencing between active scenes, so the package contains a solution to this issue. While systems such as injection can get around the issue, the solution I've provided is more akin to the ```FindObjectsOfType``` & ```GetComponent``` styles of referencing that all will be familiar with. The only difference with this is that. The ```MultiSceneElly``` class provides the functionality for this by searching all active scenes or a specific scene that you provide for the component of the type you are looking for. Its import to note that this will work whenever called, but you will need to be sure the scene is loaded when you call for it.
52
-
53
-
### Awake, OnEnable or Start But MultiScene
54
-
To ensure logic runs when all scenes are loaded in a group, you can implement an interface. For farmiliarity these are called ```IMultiSceneAwake```, ```IMultiSceneEnable``` & ```IMultiSceneStart```. When implemented any logic in the implementation method will run once all scene have been loading by the ```MultiSceneManager```. Alternatively you can listen to the before & post events on the ```MultiSceneManager``` and achieve the same result.
55
-
56
-
#### Ordering
57
-
If you are using any of ```IMultiSceneAwake```, ```IMultiSceneEnable``` or ```IMultiSceneStart``` you can also define their execution order just like in the scripting execution order in the porject settings. This is done by adding the ```[MultiSceneOrdered]``` attribute to any of the previously mentioned interface implementation methods. The define the order itself, just add a number in brackets like so: ```[MultiSceneOrdered(-10)]```. The order runs with negative numbers first, then any with no ordering followed by any with a positive number.
58
-
59
-
# Extensions
60
-
While the core library will handle most essential logic, there are some extension packages which act as extra features that you can choose to use if your project requires them. These are standalone and will always require the core library to function. Currently there are the following extensions:
27
+
## Documentation
28
+
You can access a online of the documentation here: <ahref="https://carter.games/multiscene">Online Documentation</a>. A offline copy if provided with the package and asset if needed.
61
29
62
-
### URP Cameras
63
-
URP Cameras adds support for URP camera stacking between scenes with some basic additional options added in such as following the base camera transform.
0 commit comments