For the condition of moisture, we have to implement the drinking interaction. In the project, there are river that has unlimited source of water. Utilizing that source, player can fill the moisture by interacting with the river. While the development, the bug of iteminformation was occur. The hierachy can be written as Water - Ground - Player. If the player stand on the land, the interaction of water should not be done. However, the raycast gave us the possible to interact water. The problem was solved with below codes. By adding the ground layer to the interact mask, the ray has blocked at the ground.
In the project, the item slots were generated by the dynamic process. However, the component attached on item slot doesn't initialized because the mother gameobject deactivated faster than the initialization. In order to solve the problem, we asked method to the tutor.
One of charactericstic on reply was the utilizing corouting
to the Start
function. Since the 'Start' method is invoked by Unity, I didn't give an idea to modify the method. And other on reply is the usage of canvas group. In the canvas group component, there's an variable to control transparency of canvas. Utilizing coroutine on Start
, we also applied canvas group; like below code snippet.