Unity Templates App Name and API Key Configuration not appearing

Home Forums Unity Templates Unity Templates App Name and API Key Configuration not appearing

Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #4133

    glide-1944
    Participant

    I did a run through of both Unity Templates (Explore AR and Ghost Hunter) and followed along with their respective videos to check out the functionality of Motive, but whenever get to the part of the video when they go to name the App and set up the API Key to complete the configuration, the codes in the Setup have a warning in the Unity Inspector that say “The associated script can not be loaded. Please fix any compile errors and assign a valid script.” I go through the rest of the items in the scene and every code has the same warning in the inspector. I have followed the video closely and it has 31 different warnings and 11 different errors in the Ghost Hunter Template, and 33 different warnings and 11 errors in the Explore AR Template. I don’t know if it is something wrong with the Unity Package available or if it is the because of the version of Unity I am working with (2017.1.2f1). If anyone can explain why these warnings are showing up or can offer a solution it would be greatly appreciated.

    #4134

    ryan
    Participant

    Thanks for reaching out! Yes you’ll need to use at least 2017.2.1f1. We’ve also been testing with 2017.3. If you can’t switch to this version, please let me know and I’ll see if I can get you some code snippets that get this working in 2017.1.

    #4144

    ryan
    Participant

    Or you can try making these changes to SafeAreaResize.cs and SafeAreaTop.cs:

    SafeAreaResize.cs:

    public class SafeAreaResize : MonoBehaviour {

    // Use this for initialization
    void Start ()
    {
    #if UNITY_2017_2_OR_NEWER
    var tf = (RectTransform)this.transform;

    var dux = Screen.width – Screen.safeArea.width – Screen.safeArea.x;
    var duy = Screen.height – Screen.safeArea.height – Screen.safeArea.y;

    var left = Screen.safeArea.x / Screen.width;
    var right = (Screen.width – dux) / Screen.width;
    var bottom = Screen.safeArea.y / Screen.height;
    var top = (Screen.height – duy) / Screen.height;

    tf.anchorMin = new Vector2(left, bottom);
    tf.anchorMax = new Vector2(right, top);
    tf.sizeDelta = new Vector2(0, 0);
    #endif
    }
    }

    SafeAreaTop.cs:

    public class SafeAreaTop : MonoBehaviour {
    //public RectTransform ReferenceRect;

    // Use this for initialization
    void Start ()
    {
    #if UNITY_2017_2_OR_NEWER
    var tf = (RectTransform)this.transform;
    var duy = Screen.height – Screen.safeArea.height – Screen.safeArea.y;
    var topPct = duy / Screen.height;

    tf.anchorMax = new Vector2(1, 1);
    tf.anchorMin = new Vector2(0, 1 – topPct);

    tf.sizeDelta = new Vector2(0, 0);
    #endif
    }
    }

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.