Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented Scene Variable, Reference, and Collection #57

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Assets/PR Test Content.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions Assets/PR Test Content/LoadSceneOnAwake.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using ScriptableObjectArchitecture;
using UnityEngine;
using UnityEngine.SceneManagement;

namespace PR_Test_Content
{
public class LoadSceneOnAwake : MonoBehaviour
{
public SceneReference sceneReference;

private void Awake()
{
if (sceneReference.Value.IsSceneEnabled && sceneReference.Value.IsSceneInBuildSettings)
{
SceneManager.LoadScene(sceneReference.Value.SceneName, LoadSceneMode.Additive);
}
}
}
}
3 changes: 3 additions & 0 deletions Assets/PR Test Content/LoadSceneOnAwake.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions Assets/PR Test Content/SceneCollection.asset
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: baec154247b223d4a9b1afe90aa2cf2c, type: 3}
m_Name: SceneCollection
m_EditorClassIdentifier:
DeveloperDescription:
_value:
_list:
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
8 changes: 8 additions & 0 deletions Assets/PR Test Content/SceneCollection.asset.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions Assets/PR Test Content/SceneReferenceExample.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using ScriptableObjectArchitecture;
using UnityEngine;

namespace PR_Test_Content
{
public class SceneReferenceExample : MonoBehaviour
{
[SerializeField]
private SceneReference _sceneReference;

[SerializeField]
private SceneReference[] _sceneReferences;

[SerializeField]
private IntReference _intReference;

[SerializeField]
private IntReference[] _intReferences;
}
}
11 changes: 11 additions & 0 deletions Assets/PR Test Content/SceneReferenceExample.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions Assets/PR Test Content/SceneVariable.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
%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: 2953c036c3bbfff4283215395edf0cd8, type: 3}
m_Name: SceneVariable
m_EditorClassIdentifier:
DeveloperDescription:
_value:
_value:
_sceneName: Assets/PR Test Content/SceneVariableTestScene02.unity
_sceneIndex: -1
_isSceneEnabled: 0
_readOnly: 0
_raiseWarning: 1
8 changes: 8 additions & 0 deletions Assets/PR Test Content/SceneVariable.asset.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading