K
K
Kot Kotov2020-05-20 07:55:53
Unity
Kot Kotov, 2020-05-20 07:55:53

Is there a replacement for this type?

The question is a little silly, but is there an alternative for this line with only Rigidbody2D

GetComponent<Rigidbody>().rotation = (Quaternion) stream.ReceiveNext();

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
asysprotri, 2020-05-20
@asysprotri

can be done like this:

Rigidbody rb;

void Start():
    rb = GetComponent<Rigidbody>()

and in code:
rb.rotation = (Quaternion) stream.ReceiveNext();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question