TrungDong
Member
I made the character, main camera, UI, virtual control, managers ... into a prefab, like this image:
I put the prefab into the scene. The game runs fine in the Editor, also fine in my device (iPhone).
For some reasons, I have to instantiate my character runtime from code, at a specific time/event. Instead of putting the prefab into the scene, I load the prefab when it is needed.
Everything was fine on the Editor, but when I run the game on my device, the virtual controls do not appear, and if I touch the screen:
+ 1 finger: the player shot (= left click).
+ 2 fingers touch: the player zoom (= right click)
It seems the virtual controls did not work, and the game uses pc input instead.
How to fix this? Is it required to have all character's related objects in the scene from the start? In my case (I want to load character at a event)
I put the prefab into the scene. The game runs fine in the Editor, also fine in my device (iPhone).
For some reasons, I have to instantiate my character runtime from code, at a specific time/event. Instead of putting the prefab into the scene, I load the prefab when it is needed.
Everything was fine on the Editor, but when I run the game on my device, the virtual controls do not appear, and if I touch the screen:
+ 1 finger: the player shot (= left click).
+ 2 fingers touch: the player zoom (= right click)
It seems the virtual controls did not work, and the game uses pc input instead.
How to fix this? Is it required to have all character's related objects in the scene from the start? In my case (I want to load character at a event)