private static void GetValue(PolygonAreaConfig scr, out PolygonArea area, out Vector3 origin, out Vector3 dir, out Color color, out float vOffset, out float dirLineLength, out float dirLineWidth) { var type = scr.GetType(); area = (PolygonArea)type.GetFieldAll("m_Area").GetValue(scr); color = (Color)type.GetFieldAll("m_AreaColor").GetValue(scr); vOffset = (float)type.GetFieldAll("m_AreaVertialOffsetBase").GetValue(scr); dirLineLength = (float)type.GetFieldAll("m_DirLineLength").GetValue(scr); dirLineWidth = (float)type.GetFieldAll("m_DirLineWidth").GetValue(scr); var polygonType = area.GetType(); origin = (Vector3)polygonType.GetFieldAll("m_Origin").GetValue(area); dir = (Vector3)polygonType.GetFieldAll("m_Direction").GetValue(area); }