Hi all.
Im pretty new to unity, and i am working on a 2d platformer.
I am using portals to transform.position player to another position. I started up with hardcoding the new position in the script, but then i will have to a new script everytime i use a portal.
I need help to find a way to set the new location i the inspector (emty gameobject).
The script is attached to the portal.
This is what i use now
Transform.position to an emty game object
Im pretty new to unity, and i am working on a 2d platformer.
I am using portals to transform.position player to another position. I started up with hardcoding the new position in the script, but then i will have to a new script everytime i use a portal.
I need help to find a way to set the new location i the inspector (emty gameobject).
The script is attached to the portal.
This is what i use now
Code (csharp):
- public class Transit : MonoBehaviour
- {
- private GameObject player;...