keijiro / KlakHap

HAP video player plugin for Unity
Other
341 stars 27 forks source link

filePath inaccessible #46

Closed lejeanf closed 1 year ago

lejeanf commented 1 year ago

Hello and thx for your amazing work. Quick note: it would be very usefull to have access to the path variable in HapPlayer:

public string filePath { get { return _filePath; } set { _filePath = value; } }

lejeanf commented 1 year ago

It would be usefull to be able to change the path externaly as to switch videos.

keijiro commented 1 year ago

You can use resolvedFilePath to get the file path.

https://github.com/keijiro/KlakHap/blob/master/Packages/jp.keijiro.klak.hap/Runtime/HapPlayer.cs#L80

It's read-only because you can't change the file path while streaming. You should create another stream to use a different file path.