I was overviewing the example: http://docs.unity3d.com/Documentation/Manual/wp8-unity-interaction.html . When I downloaded the .zip, it worked. However following it step by step keeps giving me the same error: Code (csharp): private void Unity_Loaded() { var sphereScript = UnityEngine.Object.FindObjectOfType<SphereScript>(); sphereScript.SphereStateChanged += SphereStateChanged; SphereStateChanged(sphereScript.IsSphereMoving); } private void SphereStateChanged(bool currentSphereState) { Dispatcher.BeginInvoke(() => { SphereStateTextBlock.Text = currentSphereState ? "Sphere is moving" : "Sphere is stopped"; }); } Code (csharp): var sphereScript = UnityEngine.Object.FindObjectOfType<SphereScript>(); keeps giving me a non-generic method cant be used with type error. The SphereScript was copy and pasted in. I have attached the camera. I switched platform to windows phone 8 before building it. What am I doing wrong?
MainPage.xaml.cs : Error 1 The non-generic method 'UnityEngine.Object.FindObjectOfType(System.Type)' cannot be used with type arguments C:\*\*\Documents\Unity\Testing\Export\Testing\MainPage.xaml.cs 56 51 Testing
I'm afraid there might be a mistake in the tutorial. Could you try changing that line to this? Code (csharp): var sphereScript = UnityEngine.Object.FindObjectOfType(typeof(SphereScript)) as SphereScript;