Skip to content

Commit

Permalink
[v0.1.9] Index getter for SceneDefinition
Browse files Browse the repository at this point in the history
  • Loading branch information
g0dzZz-coder committed May 11, 2024
1 parent de15a57 commit d741876
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Runtime/Definitions/SceneDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public sealed partial class SceneDefinition : ScriptableObject
[field: TextArea, SerializeField] public string Description { get; private set; }

public string DisplayName => _displayName;
public int Index => SceneManager.GetSceneByPath(_displayName).buildIndex;

public bool IsActive() => SceneManager.GetActiveScene().name == DisplayName;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.depra.scenes",
"version": "0.1.8",
"version": "0.1.9",
"displayName": "Depra.Scenes",
"description": "",
"unity": "2022.3",
Expand Down

0 comments on commit d741876

Please sign in to comment.