I seem to be having a lot of build issues, again. the script you helped me with that changes cursos depending on scene, doesn't have effect in build but does in Unity play. Is there something I am doing wrong on export build?
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
What's the exact code the script now uses, and how/where is it called from?
here is the script:
It is called through an action list for RufusAppearance - Suited, tucked etc, which is called in scene OnStart, see screenshot:
https://www.dropbox.com/sh/54z3jjyons1nsjt/AAA9eUikoKaLUfuJU8fDTLzxa?dl=0
I get no issue testing this in a build myself. Is it all cursor types that are unchanging?
Check Unity's build log for relevant messages, but also be aware that this code makes changes to Unity's Cursor Manager, an asset file. You should run another such Action in your game's "ActionList on start game" asset to initialise your cursors to their default textures.
Which ones?
Start game asset.
ok tried that and didn't work. It is main cursor and use cursor that are not being affected in build
Not that I'm aware of - as I said, it works on my end.
You've confirmed that this does work for other interaction icons, e.g. Look? Compare the import settings for the textures involved, and check Unity's Player log for any relevant messages.
Are any icons animated? What's your "Cursor rendering" field set to?
And it works for you in build changing between scenes? The icons are animated, and identical in frames and size. Settings for both sets fo cursors (use, use) are identical. Where is cursor rendering field again?
At the top of the Cursor Manager.
If a cursor is animated, you need to use the ReplaceTexture function to update its texture. Instead of:
Use:
Without animated cursors, yes. With animated cursors, yes - once the above change has been made.
I get this error :
Assets/Sleepytime Village/Scripts/CustomActions/ChangeCursorsAction.cs(91,17): error CS1656: Cannot assign to 'ReplaceTexture' because it is a 'method group'
My cursor rendering is et to software
this is my script:
ReplaceTexture is a function - not a variable. See my example code change in my last post.