public static List <ReflectionProbeBlendInfo> GetList(ref List <ReflectionProbeBlendInfo> rList, long L, int nIndex) { try { if (rList == null) { rList = new List <ReflectionProbeBlendInfo>(); } else { rList.Clear(); } long ptr = FCLibHelper.fc_get_param_ptr(L, nIndex); int nArraySize = FCLibHelper.fc_get_array_size(ptr); for (int i = 0; i < nArraySize; ++i) { long item_ptr = FCLibHelper.fc_get_array_node_temp_ptr(ptr, i); ReflectionProbeBlendInfo item = FCGetObj.GetObj <ReflectionProbeBlendInfo>(item_ptr); rList.Add(item); } } catch (Exception e) { Debug.LogException(e); } return(rList); }
public override void Draw(InspectorField field, GUIStyle style) { ReflectionProbeBlendInfo info = field.GetValue <ReflectionProbeBlendInfo>(); GUILayout.BeginHorizontal(); EditorGUILayout.ObjectField(info.probe, typeof(ReflectionProbe), true, GUILayout.MinWidth(100), GUILayout.MaxWidth(float.MaxValue)); GUILayout.Label("Weight: " + info.weight.ToString()); GUILayout.EndHorizontal(); }
public static int constructor(IntPtr l) { int result; try { ReflectionProbeBlendInfo reflectionProbeBlendInfo = default(ReflectionProbeBlendInfo); LuaObject.pushValue(l, true); LuaObject.pushValue(l, reflectionProbeBlendInfo); result = 2; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
internal static void ShowClosestReflectionProbes(List <ReflectionProbeBlendInfo> blendInfos) { float num = 20f; float num2 = 60f; EditorGUI.BeginDisabledGroup(true); for (int i = 0; i < blendInfos.Count; i++) { Rect rect = EditorGUI.IndentedRect(GUILayoutUtility.GetRect((float)0f, (float)16f)); float num4 = (rect.width - num) - num2; Rect position = rect; position.width = num; GUI.Label(position, "#" + i, EditorStyles.miniLabel); position.x += position.width; position.width = num4; ReflectionProbeBlendInfo info = blendInfos[i]; EditorGUI.ObjectField(position, info.probe, typeof(ReflectionProbe), true); position.x += position.width; position.width = num2; ReflectionProbeBlendInfo info2 = blendInfos[i]; GUI.Label(position, "Weight " + info2.weight.ToString("f2"), EditorStyles.miniLabel); } EditorGUI.EndDisabledGroup(); }