Unity-Technologies / arfoundation-samples

Example content for Unity projects based on AR Foundation
Other
2.98k stars 1.11k forks source link

Getting Compile time error while adding State change event #1054

Closed nextechar-hardik closed 1 year ago

nextechar-hardik commented 1 year ago

I am trying to get Status change event using following code...

`

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.XR.ARFoundation;
public class ARInteraction : MonoBehaviour
{

    void onChange(ARSessionStateChangedEventArgs eventArgs)
    {
        //Debug.Log(eventArgs.state);

    }

    void Start()
    {
        ARSession.stateChanged+= onChange;

    }

    void Update()
    {

    }
} 

`

Getting error while building .. !!

Unity3d : 2021.3.17 AR Foundation : 5.0.2