public void OnEnable(SerializedObject textureBaker) { _init(textureBaker); if (editorStyles == null) { editorStyles = new MB_EditorStyles(); } editorStyles.Init(); }
private void Init(SerializedObject mb) { meshBaker = mb; objsToMesh = meshBaker.FindProperty("objsToMesh"); combiner = meshBaker.FindProperty("_meshCombiner"); outputOptions = combiner.FindPropertyRelative("_outputOption"); useObjsToMeshFromTexBaker = meshBaker.FindProperty("useObjsToMeshFromTexBaker"); textureBakeResults = combiner.FindPropertyRelative("_textureBakeResults"); mesh = combiner.FindPropertyRelative("_mesh"); sortOrderAxis = meshBaker.FindProperty("sortAxis"); settingsHolder = combiner.FindPropertyRelative("_settingsHolder"); meshBakerSettingsThis = new MeshCombineSettingEditor(); meshBakerSettingsThis.OnEnable(combiner, meshBaker); editorStyles.Init(); }
private void _InitCommon(SerializedProperty combiner) { renderType = combiner.FindPropertyRelative("_renderType"); lightmappingOption = combiner.FindPropertyRelative("_lightmapOption"); doNorm = combiner.FindPropertyRelative("_doNorm"); doTan = combiner.FindPropertyRelative("_doTan"); doUV = combiner.FindPropertyRelative("_doUV"); doUV3 = combiner.FindPropertyRelative("_doUV3"); doUV4 = combiner.FindPropertyRelative("_doUV4"); doCol = combiner.FindPropertyRelative("_doCol"); doBlendShapes = combiner.FindPropertyRelative("_doBlendShapes"); uv2OutputParamsPackingMargin = combiner.FindPropertyRelative("_uv2UnwrappingParamsPackMargin"); uv2OutputParamsHardAngle = combiner.FindPropertyRelative("_uv2UnwrappingParamsHardAngle"); centerMeshToBoundsCenter = combiner.FindPropertyRelative("_recenterVertsToBoundsCenter"); optimizeAfterBake = combiner.FindPropertyRelative("_optimizeAfterBake"); editorStyles.Init(); }