My Unity project lets the player interact with the environment. When the mouse hovers over an interactive object, the mouse becomes a magnifier signaling that the player can click the item. When clicked, a Naninovel script starts.
Every interactive object has a C#script attached to it, called ObjectInteraction, that uses PreloadAndPlayAsync(scriptName), scriptName being a public string that is written in each object. The script player is declared as a public variable in a DirectorScript and accessed through ObjectInteraction
This works for every object except for one script. For some reason, it triggers an error:
UnobservedTaskException:System.Exception: Failed to load
PubToKitchen script: The resource is not available.
Can someone help me, please? Sorry for saying it this way, but I'm on a team and I have to show a demo in two days
Here's the link with an image of the object that has to run PubToKitchen and the code of PubToKitchen
Code: Select all
�Quieres ir a la cocina? @choice Si goto:.Si @choice No goto:.No @stop # Si A @hide Dialogue @loadScene KitchenScene @stop # No B @hide Dialogue @stop
Has the script been added to the Script Resources? If yes, then try re-adding it and name it something else if possible. If that doesn't work then try deleting Library folder, re-installing Naninovel and re-importing NaninovelData folder.
What are these Script resources? I do have a folder called Scripts
EDIT: I checked the Resource Provider section of the guide and I installed the Adressable System, as it is recommended to decrease build time anyway. Still don't work
You can read more about Scripts Resources here: https://naninovel.com/guide/getting-sta ... vel-script
Auto Add Scripts in the Scripts Cofiguration is enabled by default so scripts will be added automatically but in case you rename or delete a script, you need to make the necessary adjustments yourself.