Static member `UICamera.selectedObject' cannot be accessed with an instance reference, qualify it with a type name instead.This tells you the error. You are trying to do camera.selectedObject, and 'selectedObject' is a static property. You access it literally like this: