Version: 2021.1
Create Game Script
Play To Validate

Attach Game Script

The UnityAnalyticsIntegration script can be attached to any GameObject in any Scene in your game to initialize the Unity Analytics SDK. We recommend you attach the script to a GameObject in the first Scene of your game to ensure you begin capturing as much user engagement data as possible.

In this example, we will attach the script to MainCamera. First, locate and select “Main Camera” in the Hierarchy tab on the left hand side of the Editor.

Перетащите ваш скрипт из Project View и накиньте на геймобъект Main Camera. Выберите геймобъект Main Camera и вы увидите в инспекторе, что скрипт назначен на этот геймобъект как компонент.

Заметка: Вы так же можете добавить скрипт к геймобъекту, выбрав геймобъект и найтя нужный скрипт в выпадающем меню Component в инспекторе.

Create Game Script
Play To Validate