Пример #1
0
    private void CreateGuide(Sprite sprite, AnimatorOverrideController controller)
    {
        _guidance = Instantiate(GuidancePrefab).GetComponent <Guidance>();
        _guidance.transform.parent = Camera.main.transform;

        if (sprite != null)
        {
            _guidance.SetSprite(sprite);
        }
        if (controller != null)
        {
            _guidance.SetAnimationController(controller);
        }
    }