DeveloperConsole.GetProperty C# (CSharp) 메소드

GetProperty() 공개 메소드

public GetProperty ( GameObject gameObject, Component component, string propertyName ) : void
gameObject GameObject
component Component
propertyName string
리턴 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());
		}
	}