Beispiel #1
0
    void Start()
    {
        m_Compass = FindObjectOfType <Compass>();
        DebugUtility.HandleErrorIfNullFindObject <Compass, CompassElement>(m_Compass, this);

        var markerInstance = Instantiate(compassMarkerPrefab);

        markerInstance.Initialize(this, textDirection);
        m_Compass.RegisterCompassElement(transform, markerInstance);
    }