コード例 #1
0
 private void OnEnable()
 {
     m_tabGroup = AlloyTabGroup.GetTabGroup();
     m_skinGroup = new AnimBool(m_tabGroup.IsOpen(c_skinTabName));
     m_transmissionGroup = new AnimBool(m_tabGroup.IsOpen(c_transmissionTabName));
 }
コード例 #2
0
    //Passed in by the base editor
    public AlloyTextureFieldDrawer(AlloyInspectorBase editor, MaterialProperty property)
        : base(editor, property) {
        m_tabGroup = AlloyTabGroup.GetTabGroup();
        m_tabOpen.speed = 4.0f;

        m_scale = Serialized.FindPropertyRelative("m_Scale");
        m_offset = Serialized.FindPropertyRelative("m_Offset");

        m_shaderVarName = Property.name;


        CacheTextureProps(editor, m_shaderVarName, out m_velocityProp, out m_spinProp, out m_uvProp);
    }
コード例 #3
0
	public void OnEnable() {
		if (HasMutlipleShaders()) {
			return;
		}

		if (Target != null) {
			var ns = Target.shader;
			m_oldShader = ns;
		}

		TabGroup = AlloyTabGroup.GetTabGroup();
		m_properties = new Dictionary<string, SerializedProperty>();

		InitMaterialProps();

		if (Targets.Length > 1) {
			if (MaterialsAreMismatched()) {
				foreach (var target in Targets) {
					ClearMaterialCrum((Material)target);
				}

				IsValid = false;
				return;
			}
		}



		InitAllProps();

		SceneView.onSceneGUIDelegate += OnAlloySceneGUI;
		OnAlloyShaderEnable();
	}
コード例 #4
0
    public AlloyTexCoordDrawer(AlloyInspectorBase editor, MaterialProperty property)
        : base(editor, property) {

        m_shaderVarName = Property.name.Replace("_ST", "");
        m_tabGroup = AlloyTabGroup.GetTabGroup();

        m_tabOpen.value = m_tabGroup.IsOpen(SaveName);

        AlloyTextureFieldDrawer.CacheTextureProps(editor,
            m_shaderVarName,
            out m_scrollProp,
            out m_spinProp,
            out m_uvProp);
    }