Beispiel #1
0
    void Awake()
    {
        var components = GetComponents <IInteractComponent>();

        _manipulators  = components;
        GrabbingObject = (BoolWithEvent)Resources.Load("GrabbingObject");
        MovementSpeedReductionObject = (FloatWithEvent)Resources.Load("MovementReduction");

        if (transform.localScale != Vector3.one)
        {
            if (transform.GetChild(0) != null)
            {
                transform.GetChild(0).localScale = transform.localScale;
                transform.localScale             = Vector3.one;
                Debug.LogWarning("Please set the scale of this Interactive Object to (1,1,1)!", transform);
            }
        }
    }