Пример #1
0
    public void Start()
    {
        udpListener = new UDPReceiver2();

        ClearVariables();

        SetupUDP();
    }
Пример #2
0
    // <summary>
    /// Set instance for settings object and initialize callbacks of UI
    /// </summary>
    private void Awake()
    {
        // Check singleton, each time the menu scene is loaded, the instance is replaced with the newest script
        if (instance == null)
        {
            instance = this;
        }
        else
        {
            // Update Singleton when loading a new scene
            Destroy(instance.gameObject);
            instance = this;
        }

        // Add processing jobs coroutine in runtime to the same object
        calculationJobs = gameObject.AddComponent <CalculationJob>();

        // Start entities
        udpListener = new UDPReceiver2();
        bfVariables = new List <BiofeedbackVariable>();
    }