Beispiel #1
0
    void Start()
    {
        GameObject cultivableObject = new GameObject("Cultivable");

        cultivableObject.transform.SetParent(transform, false);

        cropRenderer = cultivableObject.AddComponent <SpriteRenderer>();
        cropRenderer.sortingLayerName = "Items";
        cropRenderer.enabled          = false;

        Selectable selectable = GetComponent <Selectable>();

        if (selectable)
        {
            selectable.AddInteraction(this);
        }
    }