unity-scene-reference icon indicating copy to clipboard operation
unity-scene-reference copied to clipboard

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

Open laurentopia opened this issue 5 years ago • 3 comments

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

laurentopia avatar Aug 08 '20 13:08 laurentopia

Can you elaborate a little bit?

starikcetin avatar Aug 08 '20 14:08 starikcetin

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 avatar Aug 08 '20 23:08 laurentopia

@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.

Tymski avatar Nov 09 '20 16:11 Tymski