I added this script to the canvas on which the mobile stick was.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class JoyStickController : MonoBehaviour {
private static bool joystickExists;
// Use this for initialization
void Start () {
if (!joystickExists)
{
joystickExists = true;
DontDestroyOnLoad(transform.gameObject);
}
else {
Destroy(gameObject);
}
}
// Update is called once per frame
void Update () {
}
}
But for some reason when I go to the other scene the joystick freezes.
Here is a video of demonstrating it: