DeveloperConsole.GetProperty C# (CSharp) Method

GetProperty() public method

public GetProperty ( GameObject gameObject, Component component, string propertyName ) : void
gameObject GameObject
component Component
propertyName string
return void
	void GetProperty(GameObject gameObject, Component component, string propertyName)
	{
		Type componentType = component.GetType();
		PropertyInfo pInfo = componentType.GetProperty(propertyName);
		
		if (pInfo != null)
		{
			PrintToConsole(pInfo.GetValue(component, null).ToString());
		}
	}