Script won't load, unknown reason
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
https://i.ibb.co/FY045S0/Puerta.png
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