JohannesMP / unity-scene-reference

A SceneReference wrapper class that uses ISerializationCallbackReceiver and a custom PropertyDrawer to provide safe, user-friendly scene references in scripts.

Home Page:https://gist.github.com/JohannesMP/ec7d3f0bcf167dab3d0d3bb480e0e07b

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how would i store the scene name instead of the path?

laurentopia opened this issue · comments

it's more consistent with my game which maintains unique scene name

Can you elaborate a little bit?

currently it's storing the relative asset path and not the name
to guaranty uniqueness
I'd like to store the scene name instead, how do I change the code to do that?

@laurentopia this asset is for storing references to scenes and not for keeping convention names in your project.
If you want to get the scene name from the path just use System.IO.Path.GetFileNameWithoutExtension method.