├── .gitignore
├── .npmignore
├── .yamato
├── MaterialSwitch-pack.yml
├── MaterialSwitch-promotion.yml
├── MaterialSwitch-publish.yml
├── MaterialSwitch-test.yml
├── MaterialSwitch-updated-dependencies-test.yml
└── MaterialSwitch.metafile
├── CHANGELOG.md
├── CHANGELOG.md.meta
├── CONTRIBUTING.md
├── CONTRIBUTING.md.meta
├── Documentation~
├── TableOfContents.md
├── images
│ ├── copy-paste-material-properties.png
│ ├── image1.png
│ ├── image2.png
│ ├── image3.png
│ ├── image4.png
│ ├── image5.png
│ ├── image6.png
│ ├── image7.png
│ ├── initial-sprite-switch-clip-inspector.png
│ ├── material-switch-clip-inspector.png
│ ├── override-texture-property.png
│ ├── package-manager-add-from-git.png
│ ├── property-name-remap.png
│ ├── remove-texture-property-override.png
│ ├── sprite-renderer.png
│ └── sprite-switch-clip-inspector.png
├── index.md
├── installation.md
├── material-switch-clip.md
├── property-name-remap.md
└── sprite-switch-clip.md
├── Editor.meta
├── Editor
├── AssemblyInfo.cs
├── AssemblyInfo.cs.meta
├── CoordPickerWindow.cs
├── CoordPickerWindow.cs.meta
├── MaterialPropertiesClipboardData.cs
├── MaterialPropertiesClipboardData.cs.meta
├── MaterialPropertyNameRemapEditor.cs
├── MaterialPropertyNameRemapEditor.cs.meta
├── MaterialPropertyReorderableList.cs
├── MaterialPropertyReorderableList.cs.meta
├── MaterialSwitchClipEditor.cs
├── MaterialSwitchClipEditor.cs.meta
├── MaterialSwitchClipTimelineEditor.cs
├── MaterialSwitchClipTimelineEditor.cs.meta
├── MaterialSwitchEditorUtility.cs
├── MaterialSwitchEditorUtility.cs.meta
├── MaterialSwitchUtility.cs
├── MaterialSwitchUtility.cs.meta
├── RemapNameCache.cs
├── RemapNameCache.cs.meta
├── Unity.MaterialSwitch.Editor.asmdef
└── Unity.MaterialSwitch.Editor.asmdef.meta
├── LICENSE.md
├── LICENSE.md.meta
├── MaterialSwitch~
├── Assets
│ ├── Animations.meta
│ ├── Animations
│ │ ├── UniChananim.anim
│ │ ├── UniChananim.anim.meta
│ │ ├── UnityChan_0.controller
│ │ └── UnityChan_0.controller.meta
│ ├── Materials.meta
│ ├── Materials
│ │ ├── Cube.mat
│ │ ├── Cube.mat.meta
│ │ ├── Plane.mat
│ │ ├── Plane.mat.meta
│ │ ├── Sphere.mat
│ │ ├── Sphere.mat.meta
│ │ ├── Sprite.mat
│ │ ├── Sprite.mat.meta
│ │ ├── ToonPlane.mat
│ │ ├── ToonPlane.mat.meta
│ │ ├── ToonSphere.mat
│ │ └── ToonSphere.mat.meta
│ ├── Scenes.meta
│ ├── Scenes
│ │ ├── Palette.meta
│ │ ├── Palette
│ │ │ ├── PaletteScene.unity
│ │ │ ├── PaletteScene.unity.meta
│ │ │ ├── PaletteTimeline.playable
│ │ │ └── PaletteTimeline.playable.meta
│ │ ├── SampleScene.unity
│ │ ├── SampleScene.unity.meta
│ │ ├── SampleSceneSettings.lighting
│ │ ├── SampleSceneSettings.lighting.meta
│ │ ├── SampleSceneTimeline.playable
│ │ └── SampleSceneTimeline.playable.meta
│ ├── Textures.meta
│ └── Textures
│ │ ├── Palettes.meta
│ │ ├── Palettes
│ │ ├── palette01.png
│ │ ├── palette01.png.meta
│ │ ├── palette02.png
│ │ ├── palette02.png.meta
│ │ ├── palette03.png
│ │ └── palette03.png.meta
│ │ ├── UnityChan-BW.png
│ │ ├── UnityChan-BW.png.meta
│ │ ├── UnityChan.png
│ │ ├── UnityChan.png.meta
│ │ ├── noise.png
│ │ ├── noise.png.meta
│ │ ├── palette.png
│ │ ├── palette.png.meta
│ │ ├── texture1.png
│ │ ├── texture1.png.meta
│ │ ├── texture2.png
│ │ ├── texture2.png.meta
│ │ ├── texture3.png
│ │ ├── texture3.png.meta
│ │ ├── texture4.png
│ │ ├── texture4.png.meta
│ │ ├── texture5.png
│ │ ├── texture5.png.meta
│ │ ├── texture6.png
│ │ ├── texture6.png.meta
│ │ ├── texture7.png
│ │ ├── texture7.png.meta
│ │ ├── texture8.png
│ │ └── texture8.png.meta
├── Packages
│ ├── com.unity.material-switch
│ │ ├── CHANGELOG.md
│ │ ├── CHANGELOG.md.meta
│ │ ├── Documentation~
│ │ ├── Editor
│ │ ├── Editor.meta
│ │ ├── LICENSE.md
│ │ ├── LICENSE.md.meta
│ │ ├── Runtime
│ │ ├── Runtime.meta
│ │ ├── Shaders
│ │ ├── Shaders.meta
│ │ ├── Tests
│ │ ├── Tests.meta
│ │ ├── package.json
│ │ └── package.json.meta
│ ├── manifest.json
│ └── packages-lock.json
├── ProjectSettings
│ ├── AudioManager.asset
│ ├── ClusterInputManager.asset
│ ├── DynamicsManager.asset
│ ├── EditorBuildSettings.asset
│ ├── EditorSettings.asset
│ ├── GraphicsSettings.asset
│ ├── InputManager.asset
│ ├── NavMeshAreas.asset
│ ├── PackageManagerSettings.asset
│ ├── Physics2DSettings.asset
│ ├── PresetManager.asset
│ ├── ProjectSettings.asset
│ ├── ProjectVersion.txt
│ ├── QualitySettings.asset
│ ├── SceneTemplateSettings.json
│ ├── SelectionGroupsSettings.asset
│ ├── TagManager.asset
│ ├── TimeManager.asset
│ ├── TimelineSettings.asset
│ ├── UnityConnectSettings.asset
│ ├── VFXManager.asset
│ ├── VersionControlSettings.asset
│ └── XRSettings.asset
└── SelectionGroups
│ └── SelectionGroups.asset
├── README.md
├── README.md.meta
├── Runtime.meta
├── Runtime
├── AssemblyInfo.cs
├── AssemblyInfo.cs.meta
├── MaterialGroup.cs
├── MaterialGroup.cs.meta
├── MaterialProperties.cs
├── MaterialProperties.cs.meta
├── MaterialPropertyBlockManager.cs
├── MaterialPropertyBlockManager.cs.meta
├── MaterialPropertyNameMap.cs
├── MaterialPropertyNameMap.cs.meta
├── MaterialSwitchClip.cs
├── MaterialSwitchClip.cs.meta
├── MaterialSwitchMixerPlayableBehaviour.cs
├── MaterialSwitchMixerPlayableBehaviour.cs.meta
├── MaterialSwitchPlayableBehaviour.cs
├── MaterialSwitchPlayableBehaviour.cs.meta
├── MaterialSwitchProperties.cs
├── MaterialSwitchProperties.cs.meta
├── MaterialSwitchTrack.cs
├── MaterialSwitchTrack.cs.meta
├── Scripts.meta
├── Scripts
│ ├── Analytics.meta
│ └── Analytics
│ │ ├── MaterialSwitchTrackMixerEvent.cs
│ │ ├── MaterialSwitchTrackMixerEvent.cs.meta
│ │ ├── NameMapEnableEvent.cs
│ │ ├── NameMapEnableEvent.cs.meta
│ │ ├── SpriteSwitchTrackMixerEvent.cs
│ │ └── SpriteSwitchTrackMixerEvent.cs.meta
├── SelectionGroupExtensions.cs
├── SelectionGroupExtensions.cs.meta
├── SpriteGroup.cs
├── SpriteGroup.cs.meta
├── SpriteSwitchClip.cs
├── SpriteSwitchClip.cs.meta
├── SpriteSwitchEventInvoker.cs
├── SpriteSwitchEventInvoker.cs.meta
├── SpriteSwitchMixerBehaviour.cs
├── SpriteSwitchMixerBehaviour.cs.meta
├── SpriteSwitchPlayableBehaviour.cs
├── SpriteSwitchPlayableBehaviour.cs.meta
├── SpriteSwitchTrack.cs
├── SpriteSwitchTrack.cs.meta
├── Unity.MaterialSwitch.asmdef
└── Unity.MaterialSwitch.asmdef.meta
├── Scripts~
└── sync_package_info.sh
├── Shaders.meta
├── Shaders
├── TextureLerp.shader
└── TextureLerp.shader.meta
├── Tests.meta
├── Tests
├── Editor.meta
├── Editor
│ ├── MaterialSwitchClipTests.cs
│ ├── MaterialSwitchClipTests.cs.meta
│ ├── MaterialSwitchTestEditorConstants.cs
│ ├── MaterialSwitchTestEditorConstants.cs.meta
│ ├── MaterialSwitchTestEditorUtility.cs
│ ├── MaterialSwitchTestEditorUtility.cs.meta
│ ├── MaterialSwitchTrackTests.cs
│ ├── MaterialSwitchTrackTests.cs.meta
│ ├── Unity.MaterialSwitch.EditorTests.asmdef
│ └── Unity.MaterialSwitch.EditorTests.asmdef.meta
├── Runtime.meta
└── Runtime
│ ├── RuntimeTests.cs
│ ├── RuntimeTests.cs.meta
│ ├── Unity.MaterialSwitch.Tests.asmdef
│ └── Unity.MaterialSwitch.Tests.asmdef.meta
├── package.json
└── package.json.meta
/.gitignore:
--------------------------------------------------------------------------------
1 | [Ll]ibrary/
2 | [Tt]emp/
3 | [Oo]bj/
4 | [Bb]uild/
5 | [Bb]uilds/
6 | Assets/AssetStoreTools*
7 |
8 | # Visual Studio cache directory
9 | .vs/
10 |
11 | # Autogenerated VS/MD/Consulo solution and project files
12 | ExportedObj/
13 | .consulo/
14 | *.csproj
15 | *.unityproj
16 | *.sln
17 | *.suo
18 | *.tmp
19 | *.user
20 | *.userprefs
21 | *.pidb
22 | *.booproj
23 | *.svd
24 | *.pdb
25 | *.opendb
26 | MaterialSwitch~/.idea/**
27 |
28 | # Unity3D generated meta files
29 | *.pidb.meta
30 | *.pdb.meta
31 |
32 | # Unity3D Generated File On Crash Reports
33 | sysinfo.txt
34 |
35 | # Builds
36 | *.apk
37 | *.unitypackage
38 |
39 |
40 | # Unity Logs and UserSetttings
41 | MaterialSwitch~/Logs
42 | MaterialSwitch~/UserSettings
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | artifacts/**
2 | build/**
3 | .build_script/**
4 | node_modules/**
5 | Documentation/ApiDocs/**
6 | Documentation~/ApiDocs/**
7 | MaterialSwitch~/**
8 | Scripts~/**
9 | .DS_Store
10 | .npmrc
11 | .npmignore
12 | .gitignore
13 | CONTRIBUTING.md
14 | CONTRIBUTING.md.meta
15 | QAReport.md
16 | QAReport.md.meta
17 | .gitlab-ci.yml
18 | build.sh
19 | build.sh.meta
20 | build.bat
21 | build.bat.meta
22 | *.cmd
23 | *.cmd.meta
24 |
25 |
26 |
--------------------------------------------------------------------------------
/.yamato/MaterialSwitch-pack.yml:
--------------------------------------------------------------------------------
1 | {% metadata_file .yamato/MaterialSwitch.metafile %}
2 |
3 | ---
4 | pack:
5 | name: Pack {{ yamato_name }}
6 | agent:
7 | type: {{ pack_platform.type }}
8 | image: {{ pack_platform.image }}
9 | flavor: {{ pack_platform.flavor }}
10 | commands:
11 | - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
12 | - upm-ci package pack
13 | artifacts:
14 | {{ yamato_name }}_pack_artifacts:
15 | paths:
16 | - "upm-ci~/**/*"
17 |
18 |
--------------------------------------------------------------------------------
/.yamato/MaterialSwitch-promotion.yml:
--------------------------------------------------------------------------------
1 | {% metadata_file .yamato/MaterialSwitch.metafile %}
2 |
3 | ---
4 |
5 | {% for promotion_type in promotion_types %}
6 |
7 | {% for test_config in test_configs %}
8 | {% for test_platform in test_config.test_platforms %}
9 | {% for step in test_platform.test_type.steps %}
10 | {% assign platform_type = test_platform.platform_type %}
11 | {% assign editor_version= test_config.editor_version %}
12 |
13 | {{promotion_type.job_key_prefix}}_test_{{ platform_type.name }}_{{ editor_version }}_{{step.name}}:
14 | name : {{promotion_type.test_name_prefix}} {{ editor_version }} with {{step.name}} on {{ platform_type.name }}
15 | agent:
16 | type: {{ platform_type.type }}
17 | image: {{ platform_type.image }}
18 | flavor: {{ platform_type.flavor}}
19 | variables:
20 | UPMCI_PROMOTION: 1
21 | commands:
22 | - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
23 | - upm-ci package test --unity-version {{ editor_version }} {{step.arguments}}
24 | artifacts:
25 | {{ yamato_name }}_{{promotion_type.job_key_prefix}}_test_artifacts:
26 | paths:
27 | - "upm-ci~/test-results/**/*"
28 | dependencies:
29 | {% for test_dependency in promotion_type.test_dependencies %}
30 | - {{test_dependency}}
31 | {% endfor %}
32 |
33 | {% endfor %}
34 | {% endfor %}
35 | {% endfor %}
36 |
37 | {{promotion_type.job_key_prefix}}:
38 | name: {{promotion_type.job_name}}
39 | agent:
40 | type: {{ promote_platform.type }}
41 | image: {{ promote_platform.image }}
42 | flavor: {{ promote_platform.flavor }}
43 | variables:
44 | UPMCI_PROMOTION: 1
45 | commands:
46 | - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
47 | - upm-ci package promote
48 | triggers:
49 | tags:
50 | only:
51 | - /^(r|R)elease-\d+\.\d+\.\d+(-preview(\.\d+)?)?$/
52 | artifacts:
53 | {{ yamato_name }}_{{promotion_type.job_key_prefix}}_artifacts:
54 | paths:
55 | - "upm-ci~/packages/*.tgz"
56 | dependencies:
57 | - .yamato/{{ yamato_name }}-pack.yml#pack
58 | {% for test_config in test_configs %}
59 | {% for test_platform in test_config.test_platforms %}
60 | {% for step in test_platform.test_type.steps %}
61 | - .yamato/{{ yamato_name }}-promotion.yml#{{promotion_type.job_key_prefix}}_test_{{ test_platform.platform_type.name }}_{{ test_config.editor_version }}_{{step.name}}
62 | {% endfor %}
63 | {% endfor %}
64 | {% endfor %}
65 | {% endfor %}
66 |
67 |
68 |
--------------------------------------------------------------------------------
/.yamato/MaterialSwitch-publish.yml:
--------------------------------------------------------------------------------
1 | {% metadata_file .yamato/MaterialSwitch.metafile %}
2 |
3 | ---
4 | publish:
5 | name: Publish {{ yamato_name }} to Internal Registry
6 | agent:
7 | type: {{ publish_platform.type }}
8 | image: {{ publish_platform.image }}
9 | flavor: {{ publish_platform.flavor }}
10 | commands:
11 | - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
12 | - upm-ci package publish
13 | artifacts:
14 | {{ yamato_name }}_publish_artifacts:
15 | paths:
16 | - "upm-ci~/packages/*.tgz"
17 | dependencies:
18 | - .yamato/{{ yamato_name }}-pack.yml#pack
19 | {% for test_config in test_configs %}
20 | {% for test_platform in test_config.test_platforms %}
21 | {% for step in test_platform.test_type.steps %}
22 | - .yamato/{{ yamato_name }}-test.yml#test_{{ test_platform.platform_type.name }}_{{ test_config.editor_version }}_{{step.name}}
23 | {% endfor %}
24 | {% endfor %}
25 | {% endfor %}
26 |
27 | prerelease:
28 | name: Create a prerelease {{ yamato_name }}
29 | agent:
30 | type: {{ promote_platform.type }}
31 | image: {{ promote_platform.image }}
32 | flavor: {{ promote_platform.flavor }}
33 | commands:
34 | - |
35 | echo off
36 | packageFilePath=`find upm-ci~/packages -name "*.tgz" -print`
37 | if [[ $packageFilePath =~ ^upm-ci~\/packages\/.*-([0-9]+)\.([0-9]+)\.([0-9]+)(-[0-9a-zA-Z.]*)?\.tgz$ ]]; then
38 | fullMatch="${BASH_REMATCH[0]}"
39 | majorVer="${BASH_REMATCH[1]}"
40 | minorVer="${BASH_REMATCH[2]}"
41 | patchVer="${BASH_REMATCH[3]}"
42 | tagVer="${BASH_REMATCH[4]}"
43 | packageVer="${majorVer}.${minorVer}.${patchVer}${tagVer}"
44 |
45 | echo "Installing gh"
46 | curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg
47 | echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
48 | sudo apt update
49 | sudo apt install gh
50 |
51 | hostName=`dirname $GIT_REPOSITORY_URL | cut -f1 -d":" | cut -f2 -d"@"`
52 | ownerName=`dirname $GIT_REPOSITORY_URL | cut -f2 -d":"`
53 | repoName=`basename $GIT_REPOSITORY_URL | sed "s/.git//"`
54 | ownerRepo="$ownerName/$repoName"
55 | echo "Git repository URL: $GIT_REPOSITORY_URL"
56 | echo "Host: $hostName"
57 | echo "Owner: $ownerName"
58 | echo "Repo: $repoName"
59 |
60 | unset GITHUB_TOKEN
61 | echo "Creating release $packageVer"
62 | echo "$GH_YAMATO_DEPLOYMENT" > token.txt
63 |
64 | gh auth login --hostname $hostName --with-token < token.txt
65 | gh release create $packageVer $packageFilePath --title $packageVer --notes "$packageVer Release" --prerelease --target $GIT_BRANCH --repo $ownerRepo
66 | fi
67 | echo "End"
68 |
69 | dependencies:
70 | - .yamato/{{ yamato_name }}-publish.yml#publish
71 |
72 | publish_dry_run:
73 | name: Publish Dry Run {{ yamato_name }} to Internal Registry
74 | agent:
75 | type: {{ publish_platform.type }}
76 | image: {{ publish_platform.image }}
77 | flavor: {{ publish_platform.flavor }}
78 | commands:
79 | - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
80 | - upm-ci package publish --dry-run
81 | triggers:
82 | tags:
83 | only:
84 | - /^(r|R)(c|C)-\d+\.\d+\.\d+(-preview(\.\d+)?)?$/
85 | artifacts:
86 | {{ yamato_name }}_publish_dry_run_artifacts:
87 | paths:
88 | - "upm-ci~/packages/*.tgz"
89 | dependencies:
90 | - .yamato/{{ yamato_name }}-pack.yml#pack
91 | {% for test_config in test_configs %}
92 | {% for test_platform in test_config.test_platforms %}
93 | {% for step in test_platform.test_type.steps %}
94 | - .yamato/{{ yamato_name }}-test.yml#test_{{ test_platform.platform_type.name }}_{{ test_config.editor_version }}_{{step.name}}
95 | {% endfor %}
96 | {% endfor %}
97 | {% endfor %}
98 |
--------------------------------------------------------------------------------
/.yamato/MaterialSwitch-test.yml:
--------------------------------------------------------------------------------
1 | {% metadata_file .yamato/MaterialSwitch.metafile %}
2 |
3 | ---
4 |
5 |
6 | {% for test_config in test_configs %}
7 | {% for test_platform in test_config.test_platforms %}
8 | {% for step in test_platform.test_type.steps %}
9 | {% assign platform_type = test_platform.platform_type %}
10 | {% assign editor_version= test_config.editor_version %}
11 |
12 | test_{{ platform_type.name }}_{{ editor_version }}_{{step.name}}:
13 | name : Test {{ yamato_name }} using {{ editor_version }} with {{step.name}} on {{ platform_type.name }}
14 | agent:
15 | type: {{ platform_type.type }}
16 | image: {{ platform_type.image }}
17 | flavor: {{ platform_type.flavor}}
18 | commands:
19 | - {{ platform_type.cmd_prefix}} npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
20 | - {{ platform_type.cmd_prefix}} upm-ci package test --unity-version {{ editor_version }} {{step.arguments}}
21 |
22 | artifacts:
23 | {{ yamato_name }}_test_artifacts:
24 | paths:
25 | - "upm-ci~/test-results/**/*"
26 | dependencies:
27 | - .yamato/{{ yamato_name }}-pack.yml#pack
28 | {% endfor %}
29 | {% endfor %}
30 | {% endfor %}
31 |
32 | test_trigger:
33 | name: Tests Trigger for {{ yamato_name }}
34 | agent:
35 | type: {{ trigger_platform.type }}
36 | image: {{ trigger_platform.image }}
37 | flavor: {{ trigger_platform.flavor}}
38 | commands:
39 | - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
40 | - upm-ci package izon -t
41 | triggers:
42 | branches:
43 | only:
44 | - "/.*/"
45 | except:
46 | - "dev"
47 | - "**/dev"
48 | recurring:
49 | - branch: dev
50 | frequency: daily
51 | rerun: on_new_revision
52 |
53 | dependencies:
54 | - .yamato/{{ yamato_name }}-pack.yml#pack
55 | {% for test_config in test_configs %}
56 | {% for test_platform in test_config.test_platforms %}
57 | {% for step in test_platform.test_type.steps %}
58 | - .yamato/{{ yamato_name }}-test.yml#test_{{ test_platform.platform_type.name }}_{{ test_config.editor_version }}_{{step.name}}
59 | {% endfor %}
60 | {% endfor %}
61 | {% endfor %}
--------------------------------------------------------------------------------
/.yamato/MaterialSwitch-updated-dependencies-test.yml:
--------------------------------------------------------------------------------
1 | {% metadata_file .yamato/MaterialSwitch.metafile %}
2 |
3 | ---
4 |
5 | {% for test_config in test_configs %}
6 | {% for test_platform in test_config.test_platforms %}
7 | {% for step in test_platform.test_type.steps %}
8 | {% assign platform_type = test_platform.platform_type %}
9 | {% assign editor_version= test_config.editor_version %}
10 |
11 | dependency_{{ platform_type.name }}_{{ editor_version }}_{{step.name}}:
12 | name : Dependency Test {{ yamato_name }} using {{ test_config.editor_version }} with {{step.name}} on {{ platform_type.name }}
13 | agent:
14 | type: {{ platform_type.type }}
15 | image: {{ platform_type.image }}
16 | flavor: {{ platform_type.flavor}}
17 | commands:
18 | - {{ platform_type.cmd_prefix}} npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
19 | - {{ platform_type.cmd_prefix}} upm-ci package test -u {{ editor_version }} --type updated-dependencies-tests {{step.arguments}}
20 | artifacts:
21 | {{ yamato_name }}_dependency_artifacts:
22 | paths:
23 | - "upm-ci~/test-results/**/*"
24 | dependencies:
25 | - .yamato/{{ yamato_name }}-pack.yml#pack
26 | {% endfor %}
27 | {% endfor %}
28 | {% endfor %}
29 |
30 | dependency_test_trigger:
31 | name: Dependency Tests Trigger for {{ yamato_name }}
32 | agent:
33 | type: {{ trigger_platform.type }}
34 | image: {{ trigger_platform.image }}
35 | flavor: {{ trigger_platform.flavor}}
36 | commands:
37 | - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
38 | - upm-ci package izon -d
39 | artifacts:
40 | {{ yamato_name }}_dependency_test_trigger_artifacts:
41 | paths:
42 | - "upm-ci~/test-results/**/*"
43 | {{ yamato_name }}_dependency_test_packages:
44 | paths:
45 | - "upm-ci~/packages/**/*"
46 | # triggers:
47 | # branches:
48 | # only:
49 | # - "/.*/"
50 | # except:
51 | # - "dev"
52 | # - "**/dev"
53 | # recurring:
54 | # - branch: dev
55 | # frequency: daily
56 | # rerun: on_new_revision
57 |
58 | dependencies:
59 | - .yamato/{{ yamato_name }}-pack.yml#pack
60 | {% for test_config in test_configs %}
61 | {% for test_platform in test_config.test_platforms %}
62 | {% for step in test_platform.test_type.steps %}
63 | - .yamato/{{ yamato_name }}-updated-dependencies-test.yml#dependency_{{ test_platform.platform_type.name }}_{{ test_config.editor_version }}_{{step.name}}
64 | {% endfor %}
65 | {% endfor %}
66 | {% endfor %}
67 |
--------------------------------------------------------------------------------
/.yamato/MaterialSwitch.metafile:
--------------------------------------------------------------------------------
1 | yamato_name: MaterialSwitch
2 |
3 | platforms:
4 | - platform_type: &platform_win
5 | name: win
6 | type: Unity::VM
7 | image: package-ci/win10:v4
8 | flavor: b1.medium
9 | cmd_prefix:
10 | - platform_type: &platform_mac
11 | name: mac
12 | type: Unity::VM::osx
13 | image: package-ci/macos-13:v4
14 | flavor: m1.mac
15 | cmd_prefix:
16 | - platform_type: &platform_linux
17 | name: linux
18 | type: Unity::VM::GPU
19 | image: package-ci/ubuntu-20.04:v4
20 | flavor: b1.medium
21 | cmd_prefix: DISPLAY=:0.0
22 |
23 | pack_platform: &pack_platform_linux
24 | name: linux
25 | type: Unity::VM
26 | image: package-ci/ubuntu-20.04:v4
27 | flavor: b1.medium
28 |
29 | publish_platform: *platform_win
30 | promote_platform: *pack_platform_linux
31 | trigger_platform: *pack_platform_linux
32 |
33 | upm_ci_test_types:
34 | - test_type: &upm_ci_all
35 | steps:
36 | - name: standalone_il2cpp
37 | arguments: --platform standalone --backend il2cpp
38 | - name: standalone_mono
39 | arguments: --platform standalone --backend mono
40 | - name: playedit_editor
41 | arguments: --enable-code-coverage --code-coverage-options 'generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.MaterialSwitch,+Unity.MaterialSwitch.Editor,-Unity.MaterialSwitch.Tests,-Unity.MaterialSwitch.EditorTests'
42 | - test_type: &upm_ci_mono
43 | steps:
44 | - name: standalone_mono
45 | arguments: --platform standalone --backend mono
46 | - name: playedit_editor
47 | arguments: --enable-code-coverage --code-coverage-options 'generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.MaterialSwitch,+Unity.MaterialSwitch.Editor,-Unity.MaterialSwitch.Tests,-Unity.MaterialSwitch.EditorTests'
48 | - test_type: &upm_ci_playedit
49 | steps:
50 | - name: playedit_editor
51 | arguments: --enable-code-coverage --code-coverage-options 'generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.MaterialSwitch,+Unity.MaterialSwitch.Editor,-Unity.MaterialSwitch.Tests,-Unity.MaterialSwitch.EditorTests'
52 |
53 | test_configs:
54 | - editor_version: 2021.3
55 | test_platforms:
56 | - platform_type: *platform_win
57 | test_type: *upm_ci_mono
58 | - platform_type: *platform_mac
59 | test_type: *upm_ci_all
60 | - platform_type: *platform_linux
61 | test_type: *upm_ci_all
62 | - editor_version: 2022.3
63 | test_platforms:
64 | - platform_type: *platform_win
65 | test_type: *upm_ci_mono
66 | - platform_type: *platform_mac
67 | test_type: *upm_ci_all
68 | - platform_type: *platform_linux
69 | test_type: *upm_ci_all
70 | - editor_version: 6000.0
71 | test_platforms:
72 | - platform_type: *platform_win
73 | test_type: *upm_ci_mono
74 | - platform_type: *platform_mac
75 | test_type: *upm_ci_all
76 | - platform_type: *platform_linux
77 | test_type: *upm_ci_all
78 | - editor_version: trunk
79 | test_platforms:
80 | - platform_type: *platform_win
81 | test_type: *upm_ci_all
82 | - platform_type: *platform_mac
83 | test_type: *upm_ci_all
84 | - platform_type: *platform_linux
85 | test_type: *upm_ci_all
86 |
87 |
88 | promotion_types:
89 | - job_key_prefix: promote
90 | job_name: Promote MaterialSwitch to Production
91 | test_name_prefix: Test MaterialSwitch Promotion
92 | test_dependencies:
93 | - .yamato/MaterialSwitch-pack.yml#pack
94 | - job_key_prefix: prerelease_promote
95 | job_name: Prerelease and promote MaterialSwitch to Production
96 | test_name_prefix: Prerelease and test MaterialSwitch Promotion
97 | test_dependencies:
98 | - .yamato/MaterialSwitch-pack.yml#pack
99 | - .yamato/MaterialSwitch-publish.yml#prerelease
100 |
--------------------------------------------------------------------------------
/CHANGELOG.md.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e64eb96ae74a15a40b018ffcb9123bcc
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing
2 |
3 | ## If you are interested in contributing, here are some ground rules:
4 | * ... Define guidelines & rules for what contributors need to know to successfully make Pull requests against your repo ...
5 |
6 | ## All contributions are subject to the [Unity Contribution Agreement(UCA)](https://unity3d.com/legal/licenses/Unity_Contribution_Agreement)
7 | By making a pull request, you are confirming agreement to the terms and conditions of the UCA, including that your Contributions are your original creation and that you have complete right and authority to make your Contributions.
8 |
9 | ## Once you have a change ready following these ground rules. Simply make a pull request
10 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 122ed82f65c4fd14e9b8612475a98b78
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Documentation~/TableOfContents.md:
--------------------------------------------------------------------------------
1 | * [Overview](index.md)
2 | * [Installation](installation.md)
3 | * Features
4 | * [Material Switch Clip](material-switch-clip.md)
5 | * [Sprite Switch Clip](sprite-switch-clip.md)
6 | * [Property Name Remap](property-name-remap.md)
7 |
8 |
--------------------------------------------------------------------------------
/Documentation~/images/copy-paste-material-properties.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Unity-Technologies/com.unity.material-switch/8eb80129ed462ce1821328bf2509c683ea283392/Documentation~/images/copy-paste-material-properties.png
--------------------------------------------------------------------------------
/Documentation~/images/image1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Unity-Technologies/com.unity.material-switch/8eb80129ed462ce1821328bf2509c683ea283392/Documentation~/images/image1.png
--------------------------------------------------------------------------------
/Documentation~/images/image2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Unity-Technologies/com.unity.material-switch/8eb80129ed462ce1821328bf2509c683ea283392/Documentation~/images/image2.png
--------------------------------------------------------------------------------
/Documentation~/images/image3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Unity-Technologies/com.unity.material-switch/8eb80129ed462ce1821328bf2509c683ea283392/Documentation~/images/image3.png
--------------------------------------------------------------------------------
/Documentation~/images/image4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Unity-Technologies/com.unity.material-switch/8eb80129ed462ce1821328bf2509c683ea283392/Documentation~/images/image4.png
--------------------------------------------------------------------------------
/Documentation~/images/image5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Unity-Technologies/com.unity.material-switch/8eb80129ed462ce1821328bf2509c683ea283392/Documentation~/images/image5.png
--------------------------------------------------------------------------------
/Documentation~/images/image6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Unity-Technologies/com.unity.material-switch/8eb80129ed462ce1821328bf2509c683ea283392/Documentation~/images/image6.png
--------------------------------------------------------------------------------
/Documentation~/images/image7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Unity-Technologies/com.unity.material-switch/8eb80129ed462ce1821328bf2509c683ea283392/Documentation~/images/image7.png
--------------------------------------------------------------------------------
/Documentation~/images/initial-sprite-switch-clip-inspector.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Unity-Technologies/com.unity.material-switch/8eb80129ed462ce1821328bf2509c683ea283392/Documentation~/images/initial-sprite-switch-clip-inspector.png
--------------------------------------------------------------------------------
/Documentation~/images/material-switch-clip-inspector.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Unity-Technologies/com.unity.material-switch/8eb80129ed462ce1821328bf2509c683ea283392/Documentation~/images/material-switch-clip-inspector.png
--------------------------------------------------------------------------------
/Documentation~/images/override-texture-property.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Unity-Technologies/com.unity.material-switch/8eb80129ed462ce1821328bf2509c683ea283392/Documentation~/images/override-texture-property.png
--------------------------------------------------------------------------------
/Documentation~/images/package-manager-add-from-git.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Unity-Technologies/com.unity.material-switch/8eb80129ed462ce1821328bf2509c683ea283392/Documentation~/images/package-manager-add-from-git.png
--------------------------------------------------------------------------------
/Documentation~/images/property-name-remap.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Unity-Technologies/com.unity.material-switch/8eb80129ed462ce1821328bf2509c683ea283392/Documentation~/images/property-name-remap.png
--------------------------------------------------------------------------------
/Documentation~/images/remove-texture-property-override.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Unity-Technologies/com.unity.material-switch/8eb80129ed462ce1821328bf2509c683ea283392/Documentation~/images/remove-texture-property-override.png
--------------------------------------------------------------------------------
/Documentation~/images/sprite-renderer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Unity-Technologies/com.unity.material-switch/8eb80129ed462ce1821328bf2509c683ea283392/Documentation~/images/sprite-renderer.png
--------------------------------------------------------------------------------
/Documentation~/images/sprite-switch-clip-inspector.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Unity-Technologies/com.unity.material-switch/8eb80129ed462ce1821328bf2509c683ea283392/Documentation~/images/sprite-switch-clip-inspector.png
--------------------------------------------------------------------------------
/Documentation~/index.md:
--------------------------------------------------------------------------------
1 | Material Switch User Documentation
2 | ==================================
3 |
4 | # Overview
5 |
6 | Material Switch provides tools for switching and blending material parameters over a number of renderers
7 | simultaneously using Timeline.
8 |
9 |
10 | # Supported Unity Versions
11 |
12 | Unity 2021.3.45 or higher.
13 |
14 | # Dependencies
15 | 1. [Selection Groups](https://docs.unity3d.com/Packages/com.unity.selection-groups@latest).
16 | This is used to specify the set of renderers that have material parameters
17 | we want to use in Timeline with a Material Switch clip.
18 |
19 | # Quick Start
20 | 1. In the timeline window, add a new Material Switch Track.

21 | 2. The new track has an object field which you must change to the Selection Group you want to modify. All renderers and materials in this selection group can be used in the clips you will add to this track. You will manually choose which properties to use per clip in a later step.

22 | 3. Add a new material switch clip to the track.

23 | 4. The inspector window will show a number of options for modifying the clip. You can add values to override texture, color and float properties. The global properties panel allows all properties in all materials in the clip to have share an override value. The per material panels allow property overrides per material, these take precedence over any values in the global property panel. In the next step, we will override a colour property.

24 | 5. To enable colour properties on the clip, we can optionally assign a palette texture in the inspector. If the texture is not readable, a warning box will appear giving you the option to fix the texture settings with a single click.

25 | 6. Click the "Choose Color Properties Overrides" button, and a dropdown will appear with the available colour properties you can override. Choose a colour property.

26 | 7. A new row appears in the foldout, with a "Pick Color" button. If you are using a palette texture, the palette image will appear, allowing you to choose a new colour for the property. If you are not using a palette texture, the standard color picker control is used.

27 | 8. You can now play the clip, and see your colour changes take effect.
28 |
29 | # Features
30 | 1. [MaterialSwitchClip](material-switch-clip.md)
31 | 1. [Sprite Switch Clip](sprite-switch-clip.md)
32 | 1. [Property Name Remap](property-name-remap.md)
33 |
34 |
--------------------------------------------------------------------------------
/Documentation~/installation.md:
--------------------------------------------------------------------------------
1 | # Installation
2 |
3 | MaterialSwitch is currently a preview/experimental package and
4 | the following steps are required to install it.
5 |
6 |
7 |
8 | 1. Make sure git is installed in the system.
9 | 1. Open [Package Manager](https://docs.unity3d.com/Manual/upm-ui.html)
10 | 1. Click the **+** button, and choose **Add package from git URL**
11 | 1. Type in `com.unity.material-switch` and click the **Add** button.
12 | We can also specify a particular version, for example: `com.unity.material-switch@0.7.1-preview`
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Documentation~/material-switch-clip.md:
--------------------------------------------------------------------------------
1 | # Material Switch Clip
2 |
3 | 
4 |
5 | The inspector of MaterialSwitchClip is used to override material properties of objects in the
6 | [Selection Groups](https://docs.unity3d.com/Packages/com.unity.selection-groups@latest) bound to the track,
7 | and it contains two sections:
8 | 1. The global properties section
9 | To override the same properties of all materials related to the track with the same values.
10 | 2. The per material section
11 | To override the material property of each material separately.
12 |
13 |
14 | You can override the following material properties:
15 | 1. Texture (Sprites and sprite textures are not supported.)
16 | 2. Color
17 | 3. Float
18 |
19 |
20 | ## Operations
21 |
22 | ### Override a material property
23 |
24 | Click one of the "Choose Property Overrides" buttons, and select one of the properties in the dropdown menu,
25 | which lists all available properties automatically.
26 |
27 | 
28 |
29 | The selected material property will then appear in the inspector, and assigning a custom value to it will
30 | override the material property without changing the original value.
31 |
32 | ### Remove a material property override
33 |
34 | To remove a material property override, simply click on the **X** button at the top right of the property.
35 |
36 | 
37 |
38 | ### Copy and Paste Material properties.
39 |
40 | 
41 |
42 | The gears button at the top right of both sections contains items that can be used to copy the override values of the
43 | corresponding material properties and apply them to another material.
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/Documentation~/property-name-remap.md:
--------------------------------------------------------------------------------
1 | # Property Name Remap
2 |
3 | 
4 |
5 | The property name remap tool is used to map technical property names to user friendly display names.
6 |
7 | To create a new map, right click in the project window and choose Create -> Material Property Name Map.
8 | This will create a new asset which you can select and edit using the inspector.
9 |
10 | The shader field is used to create the list of the property names you wish to remap. In the above image,
11 | the Standard shader has been selected. The list of property names is then populated from the shader. If you choose
12 | a shader that already been used in a MaterialPropertyNameMap asset, a warning will be displayed.
13 |
14 | Each property name can be hidden (not displayed in a MaterialSwitchClip override) and given a meaningful display name. This name is then used in a MaterialSwitchClip when choosing properties to override.
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Documentation~/sprite-switch-clip.md:
--------------------------------------------------------------------------------
1 | # Sprite Switch Clip
2 |
3 | 
4 |
5 | The inspector of SpriteSwitchClip is used to override
6 | the sprites of [SpriteRenderer](https://docs.unity3d.com/Manual/class-SpriteRenderer.html)
7 | components in the [Selection Groups](https://docs.unity3d.com/Packages/com.unity.selection-groups@latest) bound to the track.
8 |
9 |
10 |
11 | ## Operations
12 |
13 | ### 1. Create a selection group
14 |
15 | The selection group must contain some gameobjects which have a sprite renderer component.
16 |
17 | The sprite renderer has a sprite property which cannot be changed using the material-switch-clip, so a sprite-switch track is provided specifically for this purpose.
18 |
19 | 
20 |
21 | ### 2. Create a sprite switch track
22 |
23 | Using timeline, create a sprite switch clip track, then add a sprite switch clip. The initial clip will be empty. Next, assign another texture to the sprite sheet slot. When the timeline is playing, the base texture of the sprites will be changed to this new texture.
24 |
25 | 
26 |
27 |
28 | ## Notes
29 |
30 | The sprite boundaries defined on the original spritesheet texture are always used, there is no need to define sprites on the second spritesheet texture.
31 |
--------------------------------------------------------------------------------
/Editor.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bdfda70e5e2aafa48bd4bfef0b6bf21c
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Editor/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.CompilerServices;
2 | [assembly: InternalsVisibleTo("Unity.MaterialSwitch.EditorTests")]
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Editor/AssemblyInfo.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8041b795f387c2b46aa4f84d4b96725a
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/CoordPickerWindow.cs:
--------------------------------------------------------------------------------
1 | using UnityEditor;
2 | using UnityEngine;
3 | using UnityEngine.Playables;
4 |
5 | namespace Unity.MaterialSwitch
6 | {
7 | internal class CoordPickerWindow : EditorWindow
8 | {
9 | Texture2D texture;
10 | SerializedProperty ccProperty;
11 | SerializedProperty sampledColorProperty;
12 | SerializedProperty uvProperty;
13 |
14 | public static void Open(Texture2D texture, SerializedProperty cc, Rect rect)
15 | {
16 | var window = ScriptableObject.CreateInstance();
17 | window.texture = texture;
18 | window.ccProperty = cc;
19 | window.sampledColorProperty = cc.FindPropertyRelative("targetValue");
20 | window.uvProperty = cc.FindPropertyRelative("uv");
21 | // window.ShowModalUtility(); //<-- HAHA LOL Modal is not modal. :facepalm:
22 | window.ShowAsDropDown(rect, new Vector2(texture.width, texture.height));
23 | }
24 |
25 | void OnGUI()
26 | {
27 | if (sampledColorProperty == null)
28 | {
29 | Close();
30 | return;
31 | }
32 | position = new Rect(position.x, position.y, texture.width, texture.height);
33 | var rect = position;
34 | rect.x = 0;
35 | rect.y = 0;
36 | GUI.DrawTexture(rect, texture);
37 | var e = Event.current;
38 | switch (e.type)
39 | {
40 | case EventType.MouseDrag:
41 | case EventType.MouseDown:
42 | var uv = e.mousePosition;
43 | uv.y = texture.height - uv.y;
44 | sampledColorProperty.colorValue = texture.GetPixel((int)uv.x, (int)uv.y);
45 | uvProperty.vector2Value = uv;
46 | ccProperty.serializedObject.ApplyModifiedProperties();
47 | foreach(var t in Resources.FindObjectsOfTypeAll()) {
48 | t.DeferredEvaluate();
49 | }
50 | Close();
51 | break;
52 | case EventType.MouseUp:
53 | break;
54 | }
55 | }
56 |
57 |
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/Editor/CoordPickerWindow.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 67d78a621d1bcc84295e514a9b6c6dd1
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/MaterialPropertiesClipboardData.cs:
--------------------------------------------------------------------------------
1 | using JetBrains.Annotations;
2 | using UnityEditor;
3 | using UnityEngine;
4 | using UnityEngine.Assertions;
5 |
6 | namespace Unity.MaterialSwitch
7 | {
8 |
9 | ///
10 | /// Clipboard data that is used for copy/paste material properties of MaterialSwitchClip
11 | ///
12 | public class MaterialPropertiesClipboardData
13 | {
14 |
15 | MaterialPropertiesClipboardData(MaterialSwitchClip clip, int matIndex) {
16 | m_clip = clip;
17 | m_materialIndex = matIndex;
18 | }
19 |
20 | //----------------------------------------------------------------------------------------------------------------------
21 |
22 | ///
23 | /// Create material properties clipboard data of MaterialSwitchClip that can be pasted on another MaterialSwitchClip
24 | ///
25 | /// The MaterialSwitchClip source
26 | /// The index of the material in the clip. Index less than 0 means global properties
27 | ///
28 | /// Material properties data that can be pasted on another MaterialSwitchClip
29 | [NotNull]
30 | public static MaterialPropertiesClipboardData Create(MaterialSwitchClip src, int materialIndex) {
31 | Assert.IsNotNull(src);
32 | return new MaterialPropertiesClipboardData(Object.Instantiate(src), materialIndex);
33 | }
34 |
35 | ///
36 | /// Paste this MaterialPropertiesClipboardData into a certain material in the target MaterialSwitchClip.
37 | ///
38 | /// The MaterialSwitchClip target
39 | ///
40 | /// The index of the material in the target clip.
41 | /// Index less than 0 means global properties.
42 | ///
43 | /// true if the paste is successful, false otherwise
44 | public bool PasteInto(MaterialSwitchClip target, int targetMaterialIndex) {
45 |
46 | string json = ConvertClipboardDataToJson(this);
47 | if (null == json)
48 | return false;
49 |
50 | Undo.RecordObject(target, "Paste");
51 |
52 | //negative targetIndex is reserved for global properties
53 | if (IsGlobalMaterialProperty(targetMaterialIndex)) {
54 | EditorJsonUtility.FromJsonOverwrite(json, target.globalMaterialProperties);
55 | return true;
56 | }
57 |
58 | if (targetMaterialIndex >= target.materialPropertiesList.Count)
59 | return false;
60 |
61 | //preserve material reference, this is not normally changed.
62 | Material oldMaterial = target.materialPropertiesList[targetMaterialIndex].material;
63 |
64 | EditorJsonUtility.FromJsonOverwrite(json, target.materialPropertiesList[targetMaterialIndex]);
65 | target.materialPropertiesList[targetMaterialIndex].material = oldMaterial;
66 | return true;
67 | }
68 |
69 | [CanBeNull]
70 | static string ConvertClipboardDataToJson(MaterialPropertiesClipboardData clipboardData) {
71 | int matIndex = clipboardData.m_materialIndex;
72 | MaterialSwitchClip clip = clipboardData.m_clip;
73 | if (IsGlobalMaterialProperty(matIndex))
74 | return EditorJsonUtility.ToJson(clip.globalMaterialProperties);
75 |
76 | if (matIndex >= clip.materialPropertiesList.Count)
77 | return null;
78 |
79 | return EditorJsonUtility.ToJson(clip.materialPropertiesList[matIndex]);
80 | }
81 |
82 | static bool IsGlobalMaterialProperty(int index) {
83 | return index < 0;
84 | }
85 |
86 | //----------------------------------------------------------------------------------------------------------------------
87 |
88 | readonly MaterialSwitchClip m_clip;
89 | readonly int m_materialIndex;
90 |
91 |
92 | }
93 |
94 | } //end namespace
--------------------------------------------------------------------------------
/Editor/MaterialPropertiesClipboardData.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7f47f83ca4fc7244b8ad29a1a60224bd
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/MaterialPropertyNameRemapEditor.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using UnityEditor;
3 | using UnityEngine;
4 | using Object = UnityEngine.Object;
5 |
6 | namespace Unity.MaterialSwitch
7 | {
8 | [CustomEditor(typeof(MaterialPropertyNameMap))]
9 | public class MaterialPropertyNameRemapEditor : Editor
10 | {
11 | private Dictionary _nameMaps = new Dictionary();
12 |
13 | private MaterialPropertyReorderableList _propertyList;
14 |
15 | private string _filterText;
16 |
17 | private void OnEnable()
18 | {
19 | var assets = Resources.FindObjectsOfTypeAll();
20 | foreach(var asset in assets) {
21 | if (null == asset.shader)
22 | continue;
23 | int shaderID = asset.shader.GetInstanceID();
24 | _nameMaps[shaderID] = asset;
25 | }
26 | }
27 |
28 | bool CheckForDuplicateMaps(SerializedProperty shaderProperty)
29 | {
30 | if (_nameMaps.TryGetValue(shaderProperty.objectReferenceValue.GetInstanceID(), out var existing )) {
31 | if (existing == target) return false;
32 | if (EditorUtility.DisplayDialog("Warning", $"This shader is already mapped in {existing.name}.", "Select Asset", "Cancel"))
33 | {
34 | Selection.activeObject = existing;
35 | }
36 | return true;
37 | }
38 |
39 | return false;
40 | }
41 |
42 | public override void OnInspectorGUI()
43 | {
44 | serializedObject.Update();
45 | var shaderProperty = serializedObject.FindProperty(nameof(MaterialPropertyNameMap.shader));
46 | var nameMapProperty = serializedObject.FindProperty(nameof(MaterialPropertyNameMap.nameMap));
47 |
48 |
49 |
50 | EditorGUI.BeginChangeCheck();
51 | EditorGUILayout.PropertyField(shaderProperty);
52 | if (EditorGUI.EndChangeCheck())
53 | {
54 | if (CheckForDuplicateMaps(shaderProperty)) return;
55 | //bookkeeping
56 | int shaderID = shaderProperty.objectReferenceValue.GetInstanceID();
57 | _nameMaps.Remove(shaderID);
58 | _nameMaps[shaderID] = target as MaterialPropertyNameMap;
59 |
60 | if (shaderProperty.objectReferenceValue == null)
61 | {
62 | nameMapProperty.ClearArray();
63 | }
64 | else
65 | {
66 | nameMapProperty.ClearArray();
67 | var materialProperties = GetMaterialProperties(shaderProperty.objectReferenceValue);
68 | foreach (var mp in materialProperties)
69 | {
70 | nameMapProperty.InsertArrayElementAtIndex(0);
71 | var p = nameMapProperty.GetArrayElementAtIndex(0);
72 | var propertyNameProperty = p.FindPropertyRelative(nameof(MaterialPropertyNameMap.PropertyDisplayName.propertyName));
73 | propertyNameProperty.stringValue = mp.name;
74 | var displayNameProperty = p.FindPropertyRelative(nameof(MaterialPropertyNameMap.PropertyDisplayName.displayName));
75 | displayNameProperty.stringValue = mp.displayName;
76 | }
77 | }
78 | }
79 | EditorGUI.BeginChangeCheck();
80 | _filterText = EditorGUILayout.TextField("Search", _filterText);
81 | if (EditorGUI.EndChangeCheck())
82 | {
83 | // the list needs to be recreated with a filter, as it cannot be filtered dynamically due to to caching in the ReorderableList class.
84 | _propertyList = new MaterialPropertyReorderableList(serializedObject, nameMapProperty, _filterText);
85 | }
86 | else
87 | {
88 | _propertyList ??= new MaterialPropertyReorderableList(serializedObject, nameMapProperty, filter:null);
89 | }
90 | _propertyList.DoLayoutList();
91 | serializedObject.ApplyModifiedProperties();
92 | }
93 |
94 | private IEnumerable GetMaterialProperties(Object obj)
95 | {
96 | if (obj is Shader shader)
97 | {
98 | var m = new Material(shader);
99 | foreach(var mp in MaterialEditor.GetMaterialProperties(new[] {m}))
100 | {
101 | yield return mp;
102 | }
103 | DestroyImmediate(m);
104 | }
105 | }
106 | }
107 | }
--------------------------------------------------------------------------------
/Editor/MaterialPropertyNameRemapEditor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bb069515dae9f3b4594e00a2f151e417
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/MaterialPropertyReorderableList.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using UnityEditor;
4 | using UnityEditorInternal;
5 | using UnityEngine;
6 |
7 | namespace Unity.MaterialSwitch
8 | {
9 | internal class MaterialPropertyReorderableList : ReorderableList
10 | {
11 | private string _filterText = "";
12 |
13 | public MaterialPropertyReorderableList(SerializedObject serializedObject, SerializedProperty elements, string filter) : base(serializedObject, elements, draggable:false, displayHeader:true, displayAddButton:false, displayRemoveButton:false)
14 | {
15 | this.drawElementCallback = DrawElement;
16 | this.elementHeightCallback = ElementHeight;
17 | this.drawHeaderCallback = DrawHeader;
18 | _filterText = filter;
19 | }
20 |
21 | private void DrawRow(Rect rect, System.Action col1, System.Action col2, System.Action col3)
22 | {
23 | var cursor = rect;
24 | cursor.width = rect.width * 0.45f;
25 | col1(cursor);
26 | cursor.x += cursor.width;
27 | cursor.width = rect.width * 0.1f;
28 | EditorGUIUtility.labelWidth = 48;
29 | col2(cursor);
30 | cursor.x += cursor.width;
31 | cursor.width = rect.width * 0.45f;
32 | col3(cursor);
33 | }
34 |
35 | private void DrawHeader(Rect rect)
36 | {
37 | DrawRow(rect,
38 | (r) => EditorGUI.LabelField(r, "Property", EditorStyles.boldLabel),
39 | (r) => EditorGUI.LabelField(r, "Hide", EditorStyles.boldLabel),
40 | (r) => EditorGUI.LabelField(r, "Display Name", EditorStyles.boldLabel)
41 | );
42 | }
43 |
44 | private float ElementHeight(int i)
45 | {
46 | //if we are not filtering results
47 | if (string.IsNullOrEmpty(_filterText))
48 | return EditorGUIUtility.singleLineHeight;
49 |
50 | // a filter has been specified, check that the display name matches, else return 0 to skip rendering.
51 | var query = _filterText.ToLower();
52 | var property = this.serializedProperty.GetArrayElementAtIndex(i);
53 | if (property.displayName.ToLower().Contains(query))
54 | {
55 | return EditorGUIUtility.singleLineHeight;
56 | }
57 | return 0;
58 | }
59 |
60 | private void DrawElement(Rect rect, int i, bool isactive, bool isfocused)
61 | {
62 | // if rect height is 0, this item has been filtered out and should not be drawn.
63 | if (rect.height == 0) return;
64 | var property = this.serializedProperty.GetArrayElementAtIndex(i);
65 | property.isExpanded = true;
66 | var hiddenProperty = property.FindPropertyRelative(nameof(MaterialPropertyNameMap.PropertyDisplayName.hidden));
67 | var displayNameProperty = property.FindPropertyRelative(nameof(MaterialPropertyNameMap.PropertyDisplayName.displayName));
68 |
69 | DrawRow(rect,
70 | (r) => EditorGUI.LabelField(r, property.displayName, EditorStyles.boldLabel),
71 | (r) => EditorGUI.PropertyField(r, hiddenProperty, GUIContent.none),
72 | (r) => EditorGUI.PropertyField(r, displayNameProperty, GUIContent.none)
73 | );
74 | }
75 |
76 | }
77 | }
--------------------------------------------------------------------------------
/Editor/MaterialPropertyReorderableList.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3d32176279dc43f58d42b06210a1696f
3 | timeCreated: 1669603583
--------------------------------------------------------------------------------
/Editor/MaterialSwitchClipEditor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1180fd0617def044eb60e6354814ea29
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/MaterialSwitchClipTimelineEditor.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using UnityEditor;
4 | using UnityEngine;
5 | using UnityEditor.Timeline;
6 | using UnityEngine.Timeline;
7 | using Unity.FilmInternalUtilities;
8 | using Unity.SelectionGroups;
9 | using UnityEngine.Playables;
10 |
11 | namespace Unity.MaterialSwitch
12 | {
13 | [CustomTimelineEditor(typeof(MaterialSwitchClip))]
14 | internal class MaterialSwitchClipTimelineEditor : ClipEditor
15 | {
16 |
17 |
18 |
19 |
20 | public override void OnClipChanged(TimelineClip clip)
21 | {
22 |
23 | PlayableDirector inspectedDirector = TimelineEditor.inspectedDirector;
24 | if (inspectedDirector == null)
25 | return;
26 |
27 | TrackAsset track = clip.GetParentTrack();
28 |
29 | SelectionGroup selectionGroup = inspectedDirector.GetGenericBinding(track) as SelectionGroups.SelectionGroup;
30 | if (selectionGroup == null)
31 | return;
32 | if (!selectionGroup.TryGetComponent(out MaterialGroup materialGroup))
33 | materialGroup = selectionGroup.gameObject.AddComponent();
34 |
35 | var asset = clip.asset as MaterialSwitchClip;
36 |
37 | if (asset.globalMaterialProperties == null || asset.globalMaterialProperties.needsUpdate)
38 | {
39 | asset.globalMaterialProperties =
40 | MaterialSwitchEditorUtility.CreateMaterialProperties(materialGroup.sharedMaterials);
41 | }
42 | }
43 |
44 | public override void OnCreate(TimelineClip clip, TrackAsset track, TimelineClip clonedFrom)
45 | {
46 | MaterialSwitchEditorUtility.InitMaterialSwitchClip(clip, track);
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/Editor/MaterialSwitchClipTimelineEditor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 184d748cc17799e458a76e4e73fa6b6e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/MaterialSwitchEditorUtility.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using JetBrains.Annotations;
4 | using NUnit.Framework;
5 | using Unity.SelectionGroups;
6 | using UnityEditor;
7 | using UnityEditor.Timeline;
8 | using UnityEngine;
9 | using UnityEngine.Playables;
10 | using UnityEngine.Timeline;
11 |
12 | namespace Unity.MaterialSwitch {
13 | ///
14 | /// Utility class to perform various functions on MaterialSwitch classes.
15 | ///
16 | public static class MaterialSwitchEditorUtility {
17 |
18 |
19 | [InitializeOnLoadMethod]
20 | static void InitCallbacks() {
21 | MaterialSwitchPlayableBehaviour.CreateMaterialProperties = CreateMaterialProperties;
22 | }
23 |
24 | ///
25 | /// Init a MaterialSwitchClip
26 | ///
27 | /// The clip to be initialized
28 | [CanBeNull]
29 | public static MaterialSwitchClip InitMaterialSwitchClip(TimelineClip clip, TrackAsset track) {
30 | PlayableDirector inspectedDirector = TimelineEditor.inspectedDirector;
31 | if (null == inspectedDirector)
32 | return null;
33 |
34 | SelectionGroup selectionGroup = inspectedDirector.GetGenericBinding(track) as SelectionGroup;
35 | if (selectionGroup == null)
36 | return null;
37 |
38 | if (!selectionGroup.TryGetComponent(out MaterialGroup materialPropertyGroup)) {
39 | materialPropertyGroup = selectionGroup.gameObject.AddComponent();
40 | }
41 |
42 | Assert.IsNotNull(materialPropertyGroup);
43 |
44 | MaterialSwitchClip playableAsset = clip.asset as MaterialSwitchClip;
45 | if (null == playableAsset) {
46 | Debug.LogError("Asset is not a MaterialSwitchClip: " + clip.asset);
47 | return null;
48 | }
49 |
50 | if (playableAsset.materialPropertiesList != null) {
51 | //This should be ok, probably from a duplicate operation.
52 | //Debug.LogError("PalettePropertyMap is already created.");
53 | return playableAsset;
54 | }
55 |
56 | playableAsset.globalMaterialProperties = CreateMaterialProperties(materialPropertyGroup.sharedMaterials);
57 | playableAsset.materialPropertiesList =
58 | new List(materialPropertyGroup.sharedMaterials.Length);
59 | foreach (Material t in materialPropertyGroup.sharedMaterials) {
60 | MaterialProperties ppm = CreateMaterialProperties(t);
61 | playableAsset.materialPropertiesList.Add(ppm);
62 | }
63 |
64 | return playableAsset;
65 | }
66 |
67 |
68 | internal static MaterialProperties CreateMaterialProperties(Material material) {
69 | var map = CreateMaterialProperties(new[] { material });
70 | map.material = material;
71 | return map;
72 | }
73 |
74 |
75 |
76 | internal static MaterialProperties CreateMaterialProperties(Material[] materials) {
77 |
78 | MaterialProperties ppm = new MaterialProperties() {
79 | needsUpdate = false,
80 | };
81 | var materialProperties = new List<(Material, MaterialProperty)>();
82 |
83 | foreach (var i in materials) {
84 | var mps = MaterialEditor.GetMaterialProperties(new[] { i });
85 | if (mps == null) continue;
86 | materialProperties.AddRange(from j in mps select (i,j));
87 | }
88 |
89 | if (materialProperties.Count == 0)
90 | return ppm;
91 |
92 | foreach (var (material, mp) in materialProperties) {
93 | if (mp.flags.HasFlag(MaterialProperty.PropFlags.HideInInspector))
94 | continue;
95 | if (mp.flags.HasFlag(MaterialProperty.PropFlags.PerRendererData))
96 | continue;
97 | var displayName = mp.displayName;
98 |
99 | if (mp.type == MaterialProperty.PropType.Color) {
100 | ppm.colorProperties.Add(
101 | new ColorProperty() {
102 | uv = Vector2.zero,
103 | propertyName = mp.name,
104 | targetValue = Color.clear,
105 | baseValue = mp.colorValue
106 | }
107 | );
108 | }
109 |
110 | if (mp.type == MaterialProperty.PropType.Texture) {
111 | ppm.textureProperties.Add(
112 | new TextureProperty()
113 | {
114 | propertyName = mp.name,
115 | propertyId = Shader.PropertyToID(mp.name),
116 | baseValue = mp.textureValue
117 | }
118 | );
119 | }
120 |
121 | if (mp.type == MaterialProperty.PropType.Float) {
122 | ppm.floatProperties.Add(
123 | new FloatProperty() {
124 | propertyName = mp.name,
125 | propertyId = Shader.PropertyToID(mp.name),
126 | baseValue = mp.floatValue,
127 | targetValue = mp.floatValue
128 | }
129 | );
130 | }
131 |
132 | if (mp.type == MaterialProperty.PropType.Range) {
133 | ppm.floatProperties.Add(
134 | new RangeProperty() {
135 | propertyName = mp.name,
136 | propertyId = Shader.PropertyToID(mp.name),
137 | baseValue = mp.floatValue,
138 | targetValue = mp.floatValue,
139 | rangeLimits = mp.rangeLimits
140 | }
141 | );
142 | }
143 | }
144 |
145 | return ppm;
146 | }
147 |
148 | }
149 | } //end namespace
--------------------------------------------------------------------------------
/Editor/MaterialSwitchEditorUtility.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2d362c9dd71d49fea7762b4cdd6aef99
3 | timeCreated: 1617079901
--------------------------------------------------------------------------------
/Editor/MaterialSwitchUtility.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using JetBrains.Annotations;
3 | using UnityEngine.Timeline;
4 |
5 | namespace Unity.MaterialSwitch
6 | {
7 | ///
8 | /// Utility class to perform various functions on MaterialSwitch classes.
9 | ///
10 | [Obsolete("Replaced by MaterialSwitchEditorUtility")]
11 | public static class MaterialSwitchUtility
12 | {
13 | ///
14 | /// Init a MaterialSwitchClip
15 | ///
16 | /// The clip to be initialized
17 | [CanBeNull]
18 | [Obsolete("Replaced by MaterialSwitchEditorUtility.InitMaterialSwitchClip")]
19 | public static MaterialSwitchClip InitMaterialSwitchClip(TimelineClip clip, TrackAsset track) {
20 | return MaterialSwitchEditorUtility.InitMaterialSwitchClip(clip, track);
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/Editor/MaterialSwitchUtility.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7aecd5e1b9cd6b745a952f13642d9ec5
3 | timeCreated: 1617079901
--------------------------------------------------------------------------------
/Editor/RemapNameCache.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using UnityEngine;
3 |
4 | namespace Unity.MaterialSwitch
5 | {
6 | internal class RemapNameCache
7 | {
8 | List _nameRemaps = null;
9 |
10 | internal (string displayName, bool hidden) GetDisplayName(Material material, string propertyName)
11 | {
12 | if(_nameRemaps == null) CollectRemaps();
13 |
14 | var displayName = propertyName;
15 | var isHidden = false;
16 |
17 | if (material != null && material.shader != null)
18 | {
19 | foreach(var map in _nameRemaps)
20 | {
21 | if(map.shader == material.shader)
22 | {
23 | if (map.TryGetValue(propertyName, out var remappedName))
24 | {
25 | displayName = remappedName.displayName;
26 | isHidden = remappedName.hidden;
27 | break;
28 | }
29 | }
30 | }
31 | }
32 | return (displayName, isHidden);
33 | }
34 |
35 | void CollectRemaps()
36 | {
37 | var mapAssets = Resources.FindObjectsOfTypeAll();
38 | _nameRemaps ??= new List();
39 | _nameRemaps.Clear();
40 | foreach (var i in mapAssets)
41 | {
42 | if (i != null)
43 | {
44 | _nameRemaps.Add(i);
45 | }
46 | }
47 | }
48 | }
49 | }
--------------------------------------------------------------------------------
/Editor/RemapNameCache.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3792bd3c33c141c5a55681be45a1b085
3 | timeCreated: 1669776633
--------------------------------------------------------------------------------
/Editor/Unity.MaterialSwitch.Editor.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Unity.MaterialSwitch.Editor",
3 | "references": [
4 | "GUID:a1f2a1ae20746f947b43a9e2da5b01fc",
5 | "GUID:02f771204943f4a40949438e873e3eff",
6 | "GUID:f06555f75b070af458a003d92f9efb00",
7 | "GUID:dd0c3af278986724c94e16a73064c4e4",
8 | "GUID:ca4be1156066ae94a893e0236f6a75d6",
9 | "GUID:405bbed08ae367a47a5c7f18bf3b6328"
10 | ],
11 | "includePlatforms": [
12 | "Editor"
13 | ],
14 | "excludePlatforms": [],
15 | "allowUnsafeCode": false,
16 | "overrideReferences": false,
17 | "precompiledReferences": [],
18 | "autoReferenced": true,
19 | "defineConstraints": [],
20 | "versionDefines": [],
21 | "noEngineReferences": false
22 | }
--------------------------------------------------------------------------------
/Editor/Unity.MaterialSwitch.Editor.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a4fd78c50b910874eb8d2652eac248ba
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | Material Switch copyright © 2020 Unity Technologies ApS
2 |
3 | Licensed under the Unity Companion License for Unity-dependent projects--see [Unity Companion License](http://www.unity3d.com/legal/licenses/Unity_Companion_License).
4 |
5 | Unless expressly provided otherwise, the Software under this license is made available strictly on an “AS IS” BASIS WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. Please review the license for details on these and other terms and conditions.
6 |
--------------------------------------------------------------------------------
/LICENSE.md.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 472bea459083c314abd649eb7792f7bc
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Animations.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 12a2a11495848ef429490aaae7d9de1d
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Animations/UniChananim.anim.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: dde0a0d657785354284129d01827a0ab
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 7400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Animations/UnityChan_0.controller:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1107 &-7142863282776125061
4 | AnimatorStateMachine:
5 | serializedVersion: 6
6 | m_ObjectHideFlags: 1
7 | m_CorrespondingSourceObject: {fileID: 0}
8 | m_PrefabInstance: {fileID: 0}
9 | m_PrefabAsset: {fileID: 0}
10 | m_Name: Base Layer
11 | m_ChildStates:
12 | - serializedVersion: 1
13 | m_State: {fileID: 1101790171953387473}
14 | m_Position: {x: 200, y: 0, z: 0}
15 | m_ChildStateMachines: []
16 | m_AnyStateTransitions: []
17 | m_EntryTransitions: []
18 | m_StateMachineTransitions: {}
19 | m_StateMachineBehaviours: []
20 | m_AnyStatePosition: {x: 50, y: 20, z: 0}
21 | m_EntryPosition: {x: 50, y: 120, z: 0}
22 | m_ExitPosition: {x: 800, y: 120, z: 0}
23 | m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
24 | m_DefaultState: {fileID: 1101790171953387473}
25 | --- !u!91 &9100000
26 | AnimatorController:
27 | m_ObjectHideFlags: 0
28 | m_CorrespondingSourceObject: {fileID: 0}
29 | m_PrefabInstance: {fileID: 0}
30 | m_PrefabAsset: {fileID: 0}
31 | m_Name: UnityChan_0
32 | serializedVersion: 5
33 | m_AnimatorParameters: []
34 | m_AnimatorLayers:
35 | - serializedVersion: 5
36 | m_Name: Base Layer
37 | m_StateMachine: {fileID: -7142863282776125061}
38 | m_Mask: {fileID: 0}
39 | m_Motions: []
40 | m_Behaviours: []
41 | m_BlendingMode: 0
42 | m_SyncedLayerIndex: -1
43 | m_DefaultWeight: 0
44 | m_IKPass: 0
45 | m_SyncedLayerAffectsTiming: 0
46 | m_Controller: {fileID: 9100000}
47 | --- !u!1102 &1101790171953387473
48 | AnimatorState:
49 | serializedVersion: 6
50 | m_ObjectHideFlags: 1
51 | m_CorrespondingSourceObject: {fileID: 0}
52 | m_PrefabInstance: {fileID: 0}
53 | m_PrefabAsset: {fileID: 0}
54 | m_Name: UniChananim
55 | m_Speed: 1
56 | m_CycleOffset: 0
57 | m_Transitions: []
58 | m_StateMachineBehaviours: []
59 | m_Position: {x: 50, y: 50, z: 0}
60 | m_IKOnFeet: 0
61 | m_WriteDefaultValues: 1
62 | m_Mirror: 0
63 | m_SpeedParameterActive: 0
64 | m_MirrorParameterActive: 0
65 | m_CycleOffsetParameterActive: 0
66 | m_TimeParameterActive: 0
67 | m_Motion: {fileID: 7400000, guid: dde0a0d657785354284129d01827a0ab, type: 2}
68 | m_Tag:
69 | m_SpeedParameter:
70 | m_MirrorParameter:
71 | m_CycleOffsetParameter:
72 | m_TimeParameter:
73 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Animations/UnityChan_0.controller.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ef3a43484c0fefb4b980ddd7fa774982
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 9100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Materials.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c577f37f80e50674db6d594d74325d18
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Materials/Cube.mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 6
6 | m_ObjectHideFlags: 0
7 | m_CorrespondingSourceObject: {fileID: 0}
8 | m_PrefabInstance: {fileID: 0}
9 | m_PrefabAsset: {fileID: 0}
10 | m_Name: Cube
11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
12 | m_ShaderKeywords:
13 | m_LightmapFlags: 4
14 | m_EnableInstancingVariants: 0
15 | m_DoubleSidedGI: 0
16 | m_CustomRenderQueue: -1
17 | stringTagMap: {}
18 | disabledShaderPasses: []
19 | m_SavedProperties:
20 | serializedVersion: 3
21 | m_TexEnvs:
22 | - _BumpMap:
23 | m_Texture: {fileID: 0}
24 | m_Scale: {x: 1, y: 1}
25 | m_Offset: {x: 0, y: 0}
26 | - _DetailAlbedoMap:
27 | m_Texture: {fileID: 0}
28 | m_Scale: {x: 1, y: 1}
29 | m_Offset: {x: 0, y: 0}
30 | - _DetailMask:
31 | m_Texture: {fileID: 0}
32 | m_Scale: {x: 1, y: 1}
33 | m_Offset: {x: 0, y: 0}
34 | - _DetailNormalMap:
35 | m_Texture: {fileID: 0}
36 | m_Scale: {x: 1, y: 1}
37 | m_Offset: {x: 0, y: 0}
38 | - _EmissionMap:
39 | m_Texture: {fileID: 0}
40 | m_Scale: {x: 1, y: 1}
41 | m_Offset: {x: 0, y: 0}
42 | - _MainTex:
43 | m_Texture: {fileID: 2800000, guid: 8b827eb70045f3b4e91f0dcda7f914ff, type: 3}
44 | m_Scale: {x: 1, y: 1}
45 | m_Offset: {x: 0, y: 0}
46 | - _MetallicGlossMap:
47 | m_Texture: {fileID: 0}
48 | m_Scale: {x: 1, y: 1}
49 | m_Offset: {x: 0, y: 0}
50 | - _OcclusionMap:
51 | m_Texture: {fileID: 0}
52 | m_Scale: {x: 1, y: 1}
53 | m_Offset: {x: 0, y: 0}
54 | - _ParallaxMap:
55 | m_Texture: {fileID: 0}
56 | m_Scale: {x: 1, y: 1}
57 | m_Offset: {x: 0, y: 0}
58 | m_Floats:
59 | - _BumpScale: 1
60 | - _Cutoff: 0.5
61 | - _DetailNormalMapScale: 1
62 | - _DstBlend: 0
63 | - _GlossMapScale: 1
64 | - _Glossiness: 0.932
65 | - _GlossyReflections: 1
66 | - _Metallic: 0.417
67 | - _Mode: 0
68 | - _OcclusionStrength: 1
69 | - _Parallax: 0.02
70 | - _SmoothnessTextureChannel: 0
71 | - _SpecularHighlights: 1
72 | - _SrcBlend: 1
73 | - _UVSec: 0
74 | - _ZWrite: 1
75 | m_Colors:
76 | - _Color: {r: 1, g: 1, b: 1, a: 1}
77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
78 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Materials/Cube.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 83f3f99b2b9ba854c87ac99eb6131ff1
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 0
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Materials/Plane.mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 6
6 | m_ObjectHideFlags: 0
7 | m_CorrespondingSourceObject: {fileID: 0}
8 | m_PrefabInstance: {fileID: 0}
9 | m_PrefabAsset: {fileID: 0}
10 | m_Name: Plane
11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
12 | m_ShaderKeywords:
13 | m_LightmapFlags: 4
14 | m_EnableInstancingVariants: 0
15 | m_DoubleSidedGI: 0
16 | m_CustomRenderQueue: -1
17 | stringTagMap: {}
18 | disabledShaderPasses: []
19 | m_SavedProperties:
20 | serializedVersion: 3
21 | m_TexEnvs:
22 | - _BumpMap:
23 | m_Texture: {fileID: 0}
24 | m_Scale: {x: 1, y: 1}
25 | m_Offset: {x: 0, y: 0}
26 | - _DetailAlbedoMap:
27 | m_Texture: {fileID: 0}
28 | m_Scale: {x: 1, y: 1}
29 | m_Offset: {x: 0, y: 0}
30 | - _DetailMask:
31 | m_Texture: {fileID: 0}
32 | m_Scale: {x: 1, y: 1}
33 | m_Offset: {x: 0, y: 0}
34 | - _DetailNormalMap:
35 | m_Texture: {fileID: 0}
36 | m_Scale: {x: 1, y: 1}
37 | m_Offset: {x: 0, y: 0}
38 | - _EmissionMap:
39 | m_Texture: {fileID: 0}
40 | m_Scale: {x: 1, y: 1}
41 | m_Offset: {x: 0, y: 0}
42 | - _MainTex:
43 | m_Texture: {fileID: 0}
44 | m_Scale: {x: 1, y: 1}
45 | m_Offset: {x: 0, y: 0}
46 | - _MetallicGlossMap:
47 | m_Texture: {fileID: 0}
48 | m_Scale: {x: 1, y: 1}
49 | m_Offset: {x: 0, y: 0}
50 | - _OcclusionMap:
51 | m_Texture: {fileID: 0}
52 | m_Scale: {x: 1, y: 1}
53 | m_Offset: {x: 0, y: 0}
54 | - _ParallaxMap:
55 | m_Texture: {fileID: 0}
56 | m_Scale: {x: 1, y: 1}
57 | m_Offset: {x: 0, y: 0}
58 | m_Floats:
59 | - _BumpScale: 1
60 | - _Cutoff: 0.5
61 | - _DetailNormalMapScale: 1
62 | - _DstBlend: 0
63 | - _GlossMapScale: 1
64 | - _Glossiness: 0.5
65 | - _GlossyReflections: 1
66 | - _Metallic: 0
67 | - _Mode: 0
68 | - _OcclusionStrength: 1
69 | - _Parallax: 0.02
70 | - _SmoothnessTextureChannel: 0
71 | - _SpecularHighlights: 1
72 | - _SrcBlend: 1
73 | - _UVSec: 0
74 | - _ZWrite: 1
75 | m_Colors:
76 | - _Color: {r: 1, g: 1, b: 1, a: 1}
77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
78 | m_BuildTextureStacks: []
79 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Materials/Plane.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2744a0c67b039cb4aafef509d0145ba9
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 0
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Materials/Sphere.mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 6
6 | m_ObjectHideFlags: 0
7 | m_CorrespondingSourceObject: {fileID: 0}
8 | m_PrefabInstance: {fileID: 0}
9 | m_PrefabAsset: {fileID: 0}
10 | m_Name: Sphere
11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
12 | m_ShaderKeywords:
13 | m_LightmapFlags: 4
14 | m_EnableInstancingVariants: 0
15 | m_DoubleSidedGI: 0
16 | m_CustomRenderQueue: -1
17 | stringTagMap: {}
18 | disabledShaderPasses: []
19 | m_SavedProperties:
20 | serializedVersion: 3
21 | m_TexEnvs:
22 | - _BumpMap:
23 | m_Texture: {fileID: 0}
24 | m_Scale: {x: 1, y: 1}
25 | m_Offset: {x: 0, y: 0}
26 | - _DetailAlbedoMap:
27 | m_Texture: {fileID: 0}
28 | m_Scale: {x: 1, y: 1}
29 | m_Offset: {x: 0, y: 0}
30 | - _DetailMask:
31 | m_Texture: {fileID: 0}
32 | m_Scale: {x: 1, y: 1}
33 | m_Offset: {x: 0, y: 0}
34 | - _DetailNormalMap:
35 | m_Texture: {fileID: 0}
36 | m_Scale: {x: 1, y: 1}
37 | m_Offset: {x: 0, y: 0}
38 | - _EmissionMap:
39 | m_Texture: {fileID: 0}
40 | m_Scale: {x: 1, y: 1}
41 | m_Offset: {x: 0, y: 0}
42 | - _MainTex:
43 | m_Texture: {fileID: 2800000, guid: 4725acc979f15fd45a7b9533e93b3391, type: 3}
44 | m_Scale: {x: 1, y: 1}
45 | m_Offset: {x: 0, y: 0}
46 | - _MetallicGlossMap:
47 | m_Texture: {fileID: 0}
48 | m_Scale: {x: 1, y: 1}
49 | m_Offset: {x: 0, y: 0}
50 | - _OcclusionMap:
51 | m_Texture: {fileID: 0}
52 | m_Scale: {x: 1, y: 1}
53 | m_Offset: {x: 0, y: 0}
54 | - _ParallaxMap:
55 | m_Texture: {fileID: 0}
56 | m_Scale: {x: 1, y: 1}
57 | m_Offset: {x: 0, y: 0}
58 | m_Floats:
59 | - _BumpScale: 1
60 | - _Cutoff: 0.5
61 | - _DetailNormalMapScale: 1
62 | - _DstBlend: 0
63 | - _GlossMapScale: 1
64 | - _Glossiness: 0.5
65 | - _GlossyReflections: 1
66 | - _Metallic: 0
67 | - _Mode: 0
68 | - _OcclusionStrength: 1
69 | - _Parallax: 0.02
70 | - _SmoothnessTextureChannel: 0
71 | - _SpecularHighlights: 1
72 | - _SrcBlend: 1
73 | - _UVSec: 0
74 | - _ZWrite: 1
75 | m_Colors:
76 | - _Color: {r: 1, g: 1, b: 1, a: 1}
77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
78 | m_BuildTextureStacks: []
79 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Materials/Sphere.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8c0bf6edd4f1c6e48b9e4b7a788e11cf
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 0
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Materials/Sprite.mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 6
6 | m_ObjectHideFlags: 0
7 | m_CorrespondingSourceObject: {fileID: 0}
8 | m_PrefabInstance: {fileID: 0}
9 | m_PrefabAsset: {fileID: 0}
10 | m_Name: Sprite
11 | m_Shader: {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
12 | m_ShaderKeywords:
13 | m_LightmapFlags: 4
14 | m_EnableInstancingVariants: 0
15 | m_DoubleSidedGI: 0
16 | m_CustomRenderQueue: -1
17 | stringTagMap: {}
18 | disabledShaderPasses: []
19 | m_SavedProperties:
20 | serializedVersion: 3
21 | m_TexEnvs:
22 | - _AlphaTex:
23 | m_Texture: {fileID: 0}
24 | m_Scale: {x: 1, y: 1}
25 | m_Offset: {x: 0, y: 0}
26 | - _BumpMap:
27 | m_Texture: {fileID: 0}
28 | m_Scale: {x: 1, y: 1}
29 | m_Offset: {x: 0, y: 0}
30 | - _DetailAlbedoMap:
31 | m_Texture: {fileID: 0}
32 | m_Scale: {x: 1, y: 1}
33 | m_Offset: {x: 0, y: 0}
34 | - _DetailMask:
35 | m_Texture: {fileID: 0}
36 | m_Scale: {x: 1, y: 1}
37 | m_Offset: {x: 0, y: 0}
38 | - _DetailNormalMap:
39 | m_Texture: {fileID: 0}
40 | m_Scale: {x: 1, y: 1}
41 | m_Offset: {x: 0, y: 0}
42 | - _EmissionMap:
43 | m_Texture: {fileID: 0}
44 | m_Scale: {x: 1, y: 1}
45 | m_Offset: {x: 0, y: 0}
46 | - _MainTex:
47 | m_Texture: {fileID: 0}
48 | m_Scale: {x: 1, y: 1}
49 | m_Offset: {x: 0, y: 0}
50 | - _MetallicGlossMap:
51 | m_Texture: {fileID: 0}
52 | m_Scale: {x: 1, y: 1}
53 | m_Offset: {x: 0, y: 0}
54 | - _OcclusionMap:
55 | m_Texture: {fileID: 0}
56 | m_Scale: {x: 1, y: 1}
57 | m_Offset: {x: 0, y: 0}
58 | - _ParallaxMap:
59 | m_Texture: {fileID: 0}
60 | m_Scale: {x: 1, y: 1}
61 | m_Offset: {x: 0, y: 0}
62 | m_Floats:
63 | - PixelSnap: 0
64 | - _BumpScale: 1
65 | - _Cutoff: 0.5
66 | - _DetailNormalMapScale: 1
67 | - _DstBlend: 0
68 | - _EnableExternalAlpha: 0
69 | - _GlossMapScale: 1
70 | - _Glossiness: 0.5
71 | - _GlossyReflections: 1
72 | - _Metallic: 0
73 | - _Mode: 0
74 | - _OcclusionStrength: 1
75 | - _Parallax: 0.02
76 | - _SmoothnessTextureChannel: 0
77 | - _SpecularHighlights: 1
78 | - _SrcBlend: 1
79 | - _UVSec: 0
80 | - _ZWrite: 1
81 | m_Colors:
82 | - _Color: {r: 1, g: 1, b: 1, a: 1}
83 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
84 | - _Flip: {r: 1, g: 1, b: 1, a: 1}
85 | - _RendererColor: {r: 1, g: 1, b: 1, a: 1}
86 | m_BuildTextureStacks: []
87 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Materials/Sprite.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 77527cad996199f4fa60222e2549c809
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 2100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Materials/ToonPlane.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4bce7a79310f1f04abbaf46203b5a9ff
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 2100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Materials/ToonSphere.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c1e4580c1eb8f8b47b904f3b37f4fe05
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 2100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Scenes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fbe827e50f411084489cacaedd699af3
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Scenes/Palette.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: be21464c9b6e43c4c9f38814393e986a
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Scenes/Palette/PaletteScene.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 814125588158f784e9a6243d8e86baed
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Scenes/Palette/PaletteTimeline.playable.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1774505f4ecc62b4f8607375681acb66
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Scenes/SampleScene.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2bf581f95af548f4fb64cb6e604669ed
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Scenes/SampleSceneSettings.lighting:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!850595691 &4890085278179872738
4 | LightingSettings:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_Name: SampleSceneSettings
10 | serializedVersion: 3
11 | m_GIWorkflowMode: 0
12 | m_EnableBakedLightmaps: 1
13 | m_EnableRealtimeLightmaps: 0
14 | m_RealtimeEnvironmentLighting: 1
15 | m_BounceScale: 1
16 | m_AlbedoBoost: 1
17 | m_IndirectOutputScale: 1
18 | m_UsingShadowmask: 1
19 | m_BakeBackend: 1
20 | m_LightmapMaxSize: 1024
21 | m_BakeResolution: 40
22 | m_Padding: 2
23 | m_TextureCompression: 1
24 | m_AO: 0
25 | m_AOMaxDistance: 1
26 | m_CompAOExponent: 1
27 | m_CompAOExponentDirect: 0
28 | m_ExtractAO: 0
29 | m_MixedBakeMode: 2
30 | m_LightmapsBakeMode: 1
31 | m_FilterMode: 1
32 | m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0}
33 | m_ExportTrainingData: 0
34 | m_TrainingDataDestination: TrainingData
35 | m_RealtimeResolution: 2
36 | m_ForceWhiteAlbedo: 0
37 | m_ForceUpdates: 0
38 | m_FinalGather: 0
39 | m_FinalGatherRayCount: 256
40 | m_FinalGatherFiltering: 1
41 | m_PVRCulling: 1
42 | m_PVRSampling: 1
43 | m_PVRDirectSampleCount: 32
44 | m_PVRSampleCount: 500
45 | m_PVREnvironmentSampleCount: 500
46 | m_PVREnvironmentReferencePointCount: 2048
47 | m_LightProbeSampleCountMultiplier: 4
48 | m_PVRBounces: 2
49 | m_PVRMinBounces: 2
50 | m_PVREnvironmentMIS: 0
51 | m_PVRFilteringMode: 2
52 | m_PVRDenoiserTypeDirect: 0
53 | m_PVRDenoiserTypeIndirect: 0
54 | m_PVRDenoiserTypeAO: 0
55 | m_PVRFilterTypeDirect: 0
56 | m_PVRFilterTypeIndirect: 0
57 | m_PVRFilterTypeAO: 0
58 | m_PVRFilteringGaussRadiusDirect: 1
59 | m_PVRFilteringGaussRadiusIndirect: 5
60 | m_PVRFilteringGaussRadiusAO: 2
61 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5
62 | m_PVRFilteringAtrousPositionSigmaIndirect: 2
63 | m_PVRFilteringAtrousPositionSigmaAO: 1
64 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Scenes/SampleSceneSettings.lighting.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 627f6995fdb57e44c865393eb689ee25
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 4890085278179872738
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Scenes/SampleSceneTimeline.playable.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f96bd54f25a8536439b4909e893f54ff
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 0
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Textures.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3c5cf8455e71b7e4ca2bd16119cbb9bf
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Textures/Palettes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 17f71558d711d114a9972494b2db8ba5
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Textures/Palettes/palette01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Unity-Technologies/com.unity.material-switch/8eb80129ed462ce1821328bf2509c683ea283392/MaterialSwitch~/Assets/Textures/Palettes/palette01.png
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Textures/Palettes/palette01.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c9939bc615820874199ebc39a6790942
3 | TextureImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 11
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 0
10 | sRGBTexture: 1
11 | linearTexture: 0
12 | fadeOut: 0
13 | borderMipMap: 0
14 | mipMapsPreserveCoverage: 0
15 | alphaTestReferenceValue: 0.5
16 | mipMapFadeDistanceStart: 1
17 | mipMapFadeDistanceEnd: 3
18 | bumpmap:
19 | convertToNormalMap: 0
20 | externalNormalMap: 0
21 | heightScale: 0.25
22 | normalMapFilter: 0
23 | isReadable: 1
24 | streamingMipmaps: 0
25 | streamingMipmapsPriority: 0
26 | grayScaleToAlpha: 0
27 | generateCubemap: 6
28 | cubemapConvolution: 0
29 | seamlessCubemap: 0
30 | textureFormat: 1
31 | maxTextureSize: 2048
32 | textureSettings:
33 | serializedVersion: 2
34 | filterMode: -1
35 | aniso: 1
36 | mipBias: -100
37 | wrapU: 1
38 | wrapV: 1
39 | wrapW: -1
40 | nPOTScale: 0
41 | lightmap: 0
42 | compressionQuality: 50
43 | spriteMode: 0
44 | spriteExtrude: 1
45 | spriteMeshType: 1
46 | alignment: 0
47 | spritePivot: {x: 0.5, y: 0.5}
48 | spritePixelsToUnits: 100
49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
50 | spriteGenerateFallbackPhysicsShape: 1
51 | alphaUsage: 1
52 | alphaIsTransparency: 1
53 | spriteTessellationDetail: -1
54 | textureType: 2
55 | textureShape: 1
56 | singleChannelComponent: 0
57 | maxTextureSizeSet: 0
58 | compressionQualitySet: 0
59 | textureFormatSet: 0
60 | applyGammaDecoding: 0
61 | platformSettings:
62 | - serializedVersion: 3
63 | buildTarget: DefaultTexturePlatform
64 | maxTextureSize: 2048
65 | resizeAlgorithm: 0
66 | textureFormat: -1
67 | textureCompression: 1
68 | compressionQuality: 50
69 | crunchedCompression: 0
70 | allowsAlphaSplitting: 0
71 | overridden: 0
72 | androidETC2FallbackOverride: 0
73 | forceMaximumCompressionQuality_BC6H_BC7: 0
74 | - serializedVersion: 3
75 | buildTarget: Standalone
76 | maxTextureSize: 2048
77 | resizeAlgorithm: 0
78 | textureFormat: -1
79 | textureCompression: 1
80 | compressionQuality: 50
81 | crunchedCompression: 0
82 | allowsAlphaSplitting: 0
83 | overridden: 0
84 | androidETC2FallbackOverride: 0
85 | forceMaximumCompressionQuality_BC6H_BC7: 0
86 | - serializedVersion: 3
87 | buildTarget: WebGL
88 | maxTextureSize: 2048
89 | resizeAlgorithm: 0
90 | textureFormat: -1
91 | textureCompression: 1
92 | compressionQuality: 50
93 | crunchedCompression: 0
94 | allowsAlphaSplitting: 0
95 | overridden: 0
96 | androidETC2FallbackOverride: 0
97 | forceMaximumCompressionQuality_BC6H_BC7: 0
98 | spriteSheet:
99 | serializedVersion: 2
100 | sprites: []
101 | outline: []
102 | physicsShape: []
103 | bones: []
104 | spriteID:
105 | internalID: 0
106 | vertices: []
107 | indices:
108 | edges: []
109 | weights: []
110 | secondaryTextures: []
111 | spritePackingTag:
112 | pSDRemoveMatte: 0
113 | pSDShowRemoveMatteOption: 0
114 | userData:
115 | assetBundleName:
116 | assetBundleVariant:
117 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Textures/Palettes/palette02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Unity-Technologies/com.unity.material-switch/8eb80129ed462ce1821328bf2509c683ea283392/MaterialSwitch~/Assets/Textures/Palettes/palette02.png
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Textures/Palettes/palette02.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1bfae4103057f3f4a849a1af58f4ae39
3 | TextureImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 11
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 0
10 | sRGBTexture: 1
11 | linearTexture: 0
12 | fadeOut: 0
13 | borderMipMap: 0
14 | mipMapsPreserveCoverage: 0
15 | alphaTestReferenceValue: 0.5
16 | mipMapFadeDistanceStart: 1
17 | mipMapFadeDistanceEnd: 3
18 | bumpmap:
19 | convertToNormalMap: 0
20 | externalNormalMap: 0
21 | heightScale: 0.25
22 | normalMapFilter: 0
23 | isReadable: 1
24 | streamingMipmaps: 0
25 | streamingMipmapsPriority: 0
26 | grayScaleToAlpha: 0
27 | generateCubemap: 6
28 | cubemapConvolution: 0
29 | seamlessCubemap: 0
30 | textureFormat: 1
31 | maxTextureSize: 2048
32 | textureSettings:
33 | serializedVersion: 2
34 | filterMode: -1
35 | aniso: 1
36 | mipBias: -100
37 | wrapU: 1
38 | wrapV: 1
39 | wrapW: -1
40 | nPOTScale: 0
41 | lightmap: 0
42 | compressionQuality: 50
43 | spriteMode: 0
44 | spriteExtrude: 1
45 | spriteMeshType: 1
46 | alignment: 0
47 | spritePivot: {x: 0.5, y: 0.5}
48 | spritePixelsToUnits: 100
49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
50 | spriteGenerateFallbackPhysicsShape: 1
51 | alphaUsage: 1
52 | alphaIsTransparency: 1
53 | spriteTessellationDetail: -1
54 | textureType: 2
55 | textureShape: 1
56 | singleChannelComponent: 0
57 | maxTextureSizeSet: 0
58 | compressionQualitySet: 0
59 | textureFormatSet: 0
60 | applyGammaDecoding: 0
61 | platformSettings:
62 | - serializedVersion: 3
63 | buildTarget: DefaultTexturePlatform
64 | maxTextureSize: 2048
65 | resizeAlgorithm: 0
66 | textureFormat: -1
67 | textureCompression: 1
68 | compressionQuality: 50
69 | crunchedCompression: 0
70 | allowsAlphaSplitting: 0
71 | overridden: 0
72 | androidETC2FallbackOverride: 0
73 | forceMaximumCompressionQuality_BC6H_BC7: 0
74 | - serializedVersion: 3
75 | buildTarget: Standalone
76 | maxTextureSize: 2048
77 | resizeAlgorithm: 0
78 | textureFormat: -1
79 | textureCompression: 1
80 | compressionQuality: 50
81 | crunchedCompression: 0
82 | allowsAlphaSplitting: 0
83 | overridden: 0
84 | androidETC2FallbackOverride: 0
85 | forceMaximumCompressionQuality_BC6H_BC7: 0
86 | - serializedVersion: 3
87 | buildTarget: WebGL
88 | maxTextureSize: 2048
89 | resizeAlgorithm: 0
90 | textureFormat: -1
91 | textureCompression: 1
92 | compressionQuality: 50
93 | crunchedCompression: 0
94 | allowsAlphaSplitting: 0
95 | overridden: 0
96 | androidETC2FallbackOverride: 0
97 | forceMaximumCompressionQuality_BC6H_BC7: 0
98 | spriteSheet:
99 | serializedVersion: 2
100 | sprites: []
101 | outline: []
102 | physicsShape: []
103 | bones: []
104 | spriteID:
105 | internalID: 0
106 | vertices: []
107 | indices:
108 | edges: []
109 | weights: []
110 | secondaryTextures: []
111 | spritePackingTag:
112 | pSDRemoveMatte: 0
113 | pSDShowRemoveMatteOption: 0
114 | userData:
115 | assetBundleName:
116 | assetBundleVariant:
117 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Textures/Palettes/palette03.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Unity-Technologies/com.unity.material-switch/8eb80129ed462ce1821328bf2509c683ea283392/MaterialSwitch~/Assets/Textures/Palettes/palette03.png
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Textures/Palettes/palette03.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5194ce629f1b5aa44b4fa727bc38dc28
3 | TextureImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 11
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 0
10 | sRGBTexture: 1
11 | linearTexture: 0
12 | fadeOut: 0
13 | borderMipMap: 0
14 | mipMapsPreserveCoverage: 0
15 | alphaTestReferenceValue: 0.5
16 | mipMapFadeDistanceStart: 1
17 | mipMapFadeDistanceEnd: 3
18 | bumpmap:
19 | convertToNormalMap: 0
20 | externalNormalMap: 0
21 | heightScale: 0.25
22 | normalMapFilter: 0
23 | isReadable: 1
24 | streamingMipmaps: 0
25 | streamingMipmapsPriority: 0
26 | grayScaleToAlpha: 0
27 | generateCubemap: 6
28 | cubemapConvolution: 0
29 | seamlessCubemap: 0
30 | textureFormat: 1
31 | maxTextureSize: 2048
32 | textureSettings:
33 | serializedVersion: 2
34 | filterMode: -1
35 | aniso: 1
36 | mipBias: -100
37 | wrapU: 1
38 | wrapV: 1
39 | wrapW: -1
40 | nPOTScale: 0
41 | lightmap: 0
42 | compressionQuality: 50
43 | spriteMode: 0
44 | spriteExtrude: 1
45 | spriteMeshType: 1
46 | alignment: 0
47 | spritePivot: {x: 0.5, y: 0.5}
48 | spritePixelsToUnits: 100
49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
50 | spriteGenerateFallbackPhysicsShape: 1
51 | alphaUsage: 1
52 | alphaIsTransparency: 1
53 | spriteTessellationDetail: -1
54 | textureType: 2
55 | textureShape: 1
56 | singleChannelComponent: 0
57 | maxTextureSizeSet: 0
58 | compressionQualitySet: 0
59 | textureFormatSet: 0
60 | applyGammaDecoding: 0
61 | platformSettings:
62 | - serializedVersion: 3
63 | buildTarget: DefaultTexturePlatform
64 | maxTextureSize: 2048
65 | resizeAlgorithm: 0
66 | textureFormat: -1
67 | textureCompression: 1
68 | compressionQuality: 50
69 | crunchedCompression: 0
70 | allowsAlphaSplitting: 0
71 | overridden: 0
72 | androidETC2FallbackOverride: 0
73 | forceMaximumCompressionQuality_BC6H_BC7: 0
74 | - serializedVersion: 3
75 | buildTarget: Standalone
76 | maxTextureSize: 2048
77 | resizeAlgorithm: 0
78 | textureFormat: -1
79 | textureCompression: 1
80 | compressionQuality: 50
81 | crunchedCompression: 0
82 | allowsAlphaSplitting: 0
83 | overridden: 0
84 | androidETC2FallbackOverride: 0
85 | forceMaximumCompressionQuality_BC6H_BC7: 0
86 | - serializedVersion: 3
87 | buildTarget: WebGL
88 | maxTextureSize: 2048
89 | resizeAlgorithm: 0
90 | textureFormat: -1
91 | textureCompression: 1
92 | compressionQuality: 50
93 | crunchedCompression: 0
94 | allowsAlphaSplitting: 0
95 | overridden: 0
96 | androidETC2FallbackOverride: 0
97 | forceMaximumCompressionQuality_BC6H_BC7: 0
98 | spriteSheet:
99 | serializedVersion: 2
100 | sprites: []
101 | outline: []
102 | physicsShape: []
103 | bones: []
104 | spriteID:
105 | internalID: 0
106 | vertices: []
107 | indices:
108 | edges: []
109 | weights: []
110 | secondaryTextures: []
111 | spritePackingTag:
112 | pSDRemoveMatte: 0
113 | pSDShowRemoveMatteOption: 0
114 | userData:
115 | assetBundleName:
116 | assetBundleVariant:
117 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Textures/UnityChan-BW.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Unity-Technologies/com.unity.material-switch/8eb80129ed462ce1821328bf2509c683ea283392/MaterialSwitch~/Assets/Textures/UnityChan-BW.png
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Textures/UnityChan-BW.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fc0fefa86d20a014daf8260d7034ecdf
3 | TextureImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 12
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 0
10 | sRGBTexture: 1
11 | linearTexture: 0
12 | fadeOut: 0
13 | borderMipMap: 0
14 | mipMapsPreserveCoverage: 0
15 | alphaTestReferenceValue: 0.5
16 | mipMapFadeDistanceStart: 1
17 | mipMapFadeDistanceEnd: 3
18 | bumpmap:
19 | convertToNormalMap: 0
20 | externalNormalMap: 0
21 | heightScale: 0.25
22 | normalMapFilter: 0
23 | isReadable: 0
24 | streamingMipmaps: 0
25 | streamingMipmapsPriority: 0
26 | vTOnly: 0
27 | grayScaleToAlpha: 0
28 | generateCubemap: 6
29 | cubemapConvolution: 0
30 | seamlessCubemap: 0
31 | textureFormat: 1
32 | maxTextureSize: 2048
33 | textureSettings:
34 | serializedVersion: 2
35 | filterMode: 1
36 | aniso: 1
37 | mipBias: 0
38 | wrapU: 1
39 | wrapV: 1
40 | wrapW: 0
41 | nPOTScale: 0
42 | lightmap: 0
43 | compressionQuality: 50
44 | spriteMode: 2
45 | spriteExtrude: 1
46 | spriteMeshType: 1
47 | alignment: 0
48 | spritePivot: {x: 0.5, y: 0.5}
49 | spritePixelsToUnits: 100
50 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
51 | spriteGenerateFallbackPhysicsShape: 1
52 | alphaUsage: 1
53 | alphaIsTransparency: 1
54 | spriteTessellationDetail: -1
55 | textureType: 8
56 | textureShape: 1
57 | singleChannelComponent: 0
58 | flipbookRows: 1
59 | flipbookColumns: 1
60 | maxTextureSizeSet: 0
61 | compressionQualitySet: 0
62 | textureFormatSet: 0
63 | ignorePngGamma: 0
64 | applyGammaDecoding: 0
65 | cookieLightType: 0
66 | platformSettings:
67 | - serializedVersion: 3
68 | buildTarget: DefaultTexturePlatform
69 | maxTextureSize: 2048
70 | resizeAlgorithm: 0
71 | textureFormat: -1
72 | textureCompression: 1
73 | compressionQuality: 50
74 | crunchedCompression: 0
75 | allowsAlphaSplitting: 0
76 | overridden: 0
77 | androidETC2FallbackOverride: 0
78 | forceMaximumCompressionQuality_BC6H_BC7: 0
79 | - serializedVersion: 3
80 | buildTarget: Standalone
81 | maxTextureSize: 2048
82 | resizeAlgorithm: 0
83 | textureFormat: -1
84 | textureCompression: 1
85 | compressionQuality: 50
86 | crunchedCompression: 0
87 | allowsAlphaSplitting: 0
88 | overridden: 0
89 | androidETC2FallbackOverride: 0
90 | forceMaximumCompressionQuality_BC6H_BC7: 0
91 | spriteSheet:
92 | serializedVersion: 2
93 | sprites: []
94 | outline: []
95 | physicsShape: []
96 | bones: []
97 | spriteID:
98 | internalID: 0
99 | vertices: []
100 | indices:
101 | edges: []
102 | weights: []
103 | secondaryTextures: []
104 | spritePackingTag:
105 | pSDRemoveMatte: 0
106 | pSDShowRemoveMatteOption: 0
107 | userData:
108 | assetBundleName:
109 | assetBundleVariant:
110 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Textures/UnityChan.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Unity-Technologies/com.unity.material-switch/8eb80129ed462ce1821328bf2509c683ea283392/MaterialSwitch~/Assets/Textures/UnityChan.png
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Textures/noise.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Unity-Technologies/com.unity.material-switch/8eb80129ed462ce1821328bf2509c683ea283392/MaterialSwitch~/Assets/Textures/noise.png
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Textures/noise.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8cf1dd6e9ee7e2046adb4aecfee36f2b
3 | TextureImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 11
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 1
10 | sRGBTexture: 1
11 | linearTexture: 0
12 | fadeOut: 0
13 | borderMipMap: 0
14 | mipMapsPreserveCoverage: 0
15 | alphaTestReferenceValue: 0.5
16 | mipMapFadeDistanceStart: 1
17 | mipMapFadeDistanceEnd: 3
18 | bumpmap:
19 | convertToNormalMap: 0
20 | externalNormalMap: 0
21 | heightScale: 0.25
22 | normalMapFilter: 0
23 | isReadable: 0
24 | streamingMipmaps: 0
25 | streamingMipmapsPriority: 0
26 | grayScaleToAlpha: 0
27 | generateCubemap: 6
28 | cubemapConvolution: 0
29 | seamlessCubemap: 0
30 | textureFormat: 1
31 | maxTextureSize: 2048
32 | textureSettings:
33 | serializedVersion: 2
34 | filterMode: -1
35 | aniso: -1
36 | mipBias: -100
37 | wrapU: -1
38 | wrapV: -1
39 | wrapW: -1
40 | nPOTScale: 1
41 | lightmap: 0
42 | compressionQuality: 50
43 | spriteMode: 0
44 | spriteExtrude: 1
45 | spriteMeshType: 1
46 | alignment: 0
47 | spritePivot: {x: 0.5, y: 0.5}
48 | spritePixelsToUnits: 100
49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
50 | spriteGenerateFallbackPhysicsShape: 1
51 | alphaUsage: 1
52 | alphaIsTransparency: 0
53 | spriteTessellationDetail: -1
54 | textureType: 0
55 | textureShape: 1
56 | singleChannelComponent: 0
57 | maxTextureSizeSet: 0
58 | compressionQualitySet: 0
59 | textureFormatSet: 0
60 | applyGammaDecoding: 0
61 | platformSettings:
62 | - serializedVersion: 3
63 | buildTarget: DefaultTexturePlatform
64 | maxTextureSize: 2048
65 | resizeAlgorithm: 0
66 | textureFormat: -1
67 | textureCompression: 1
68 | compressionQuality: 50
69 | crunchedCompression: 0
70 | allowsAlphaSplitting: 0
71 | overridden: 0
72 | androidETC2FallbackOverride: 0
73 | forceMaximumCompressionQuality_BC6H_BC7: 0
74 | spriteSheet:
75 | serializedVersion: 2
76 | sprites: []
77 | outline: []
78 | physicsShape: []
79 | bones: []
80 | spriteID:
81 | internalID: 0
82 | vertices: []
83 | indices:
84 | edges: []
85 | weights: []
86 | secondaryTextures: []
87 | spritePackingTag:
88 | pSDRemoveMatte: 0
89 | pSDShowRemoveMatteOption: 0
90 | userData:
91 | assetBundleName:
92 | assetBundleVariant:
93 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Textures/palette.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Unity-Technologies/com.unity.material-switch/8eb80129ed462ce1821328bf2509c683ea283392/MaterialSwitch~/Assets/Textures/palette.png
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Textures/palette.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b95742ee43268ab4696fa767846bb42b
3 | TextureImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 11
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 1
10 | sRGBTexture: 1
11 | linearTexture: 0
12 | fadeOut: 0
13 | borderMipMap: 0
14 | mipMapsPreserveCoverage: 0
15 | alphaTestReferenceValue: 0.5
16 | mipMapFadeDistanceStart: 1
17 | mipMapFadeDistanceEnd: 3
18 | bumpmap:
19 | convertToNormalMap: 0
20 | externalNormalMap: 0
21 | heightScale: 0.25
22 | normalMapFilter: 0
23 | isReadable: 1
24 | streamingMipmaps: 0
25 | streamingMipmapsPriority: 0
26 | grayScaleToAlpha: 0
27 | generateCubemap: 6
28 | cubemapConvolution: 0
29 | seamlessCubemap: 0
30 | textureFormat: 1
31 | maxTextureSize: 2048
32 | textureSettings:
33 | serializedVersion: 2
34 | filterMode: -1
35 | aniso: -1
36 | mipBias: -100
37 | wrapU: -1
38 | wrapV: -1
39 | wrapW: -1
40 | nPOTScale: 1
41 | lightmap: 0
42 | compressionQuality: 50
43 | spriteMode: 0
44 | spriteExtrude: 1
45 | spriteMeshType: 1
46 | alignment: 0
47 | spritePivot: {x: 0.5, y: 0.5}
48 | spritePixelsToUnits: 100
49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
50 | spriteGenerateFallbackPhysicsShape: 1
51 | alphaUsage: 1
52 | alphaIsTransparency: 0
53 | spriteTessellationDetail: -1
54 | textureType: 0
55 | textureShape: 1
56 | singleChannelComponent: 0
57 | maxTextureSizeSet: 0
58 | compressionQualitySet: 0
59 | textureFormatSet: 0
60 | applyGammaDecoding: 0
61 | platformSettings:
62 | - serializedVersion: 3
63 | buildTarget: DefaultTexturePlatform
64 | maxTextureSize: 2048
65 | resizeAlgorithm: 0
66 | textureFormat: -1
67 | textureCompression: 1
68 | compressionQuality: 50
69 | crunchedCompression: 0
70 | allowsAlphaSplitting: 0
71 | overridden: 0
72 | androidETC2FallbackOverride: 0
73 | forceMaximumCompressionQuality_BC6H_BC7: 0
74 | spriteSheet:
75 | serializedVersion: 2
76 | sprites: []
77 | outline: []
78 | physicsShape: []
79 | bones: []
80 | spriteID:
81 | internalID: 0
82 | vertices: []
83 | indices:
84 | edges: []
85 | weights: []
86 | secondaryTextures: []
87 | spritePackingTag:
88 | pSDRemoveMatte: 0
89 | pSDShowRemoveMatteOption: 0
90 | userData:
91 | assetBundleName:
92 | assetBundleVariant:
93 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Textures/texture1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Unity-Technologies/com.unity.material-switch/8eb80129ed462ce1821328bf2509c683ea283392/MaterialSwitch~/Assets/Textures/texture1.png
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Textures/texture1.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 04cbca83e6dbe9e4ba04b0305e0cf3d4
3 | TextureImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 11
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 1
10 | sRGBTexture: 1
11 | linearTexture: 0
12 | fadeOut: 0
13 | borderMipMap: 0
14 | mipMapsPreserveCoverage: 0
15 | alphaTestReferenceValue: 0.5
16 | mipMapFadeDistanceStart: 1
17 | mipMapFadeDistanceEnd: 3
18 | bumpmap:
19 | convertToNormalMap: 0
20 | externalNormalMap: 0
21 | heightScale: 0.25
22 | normalMapFilter: 0
23 | isReadable: 0
24 | streamingMipmaps: 0
25 | streamingMipmapsPriority: 0
26 | grayScaleToAlpha: 0
27 | generateCubemap: 6
28 | cubemapConvolution: 0
29 | seamlessCubemap: 0
30 | textureFormat: 1
31 | maxTextureSize: 2048
32 | textureSettings:
33 | serializedVersion: 2
34 | filterMode: -1
35 | aniso: -1
36 | mipBias: -100
37 | wrapU: -1
38 | wrapV: -1
39 | wrapW: -1
40 | nPOTScale: 1
41 | lightmap: 0
42 | compressionQuality: 50
43 | spriteMode: 0
44 | spriteExtrude: 1
45 | spriteMeshType: 1
46 | alignment: 0
47 | spritePivot: {x: 0.5, y: 0.5}
48 | spritePixelsToUnits: 100
49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
50 | spriteGenerateFallbackPhysicsShape: 1
51 | alphaUsage: 1
52 | alphaIsTransparency: 0
53 | spriteTessellationDetail: -1
54 | textureType: 0
55 | textureShape: 1
56 | singleChannelComponent: 0
57 | maxTextureSizeSet: 0
58 | compressionQualitySet: 0
59 | textureFormatSet: 0
60 | applyGammaDecoding: 0
61 | platformSettings:
62 | - serializedVersion: 3
63 | buildTarget: DefaultTexturePlatform
64 | maxTextureSize: 2048
65 | resizeAlgorithm: 0
66 | textureFormat: -1
67 | textureCompression: 1
68 | compressionQuality: 50
69 | crunchedCompression: 0
70 | allowsAlphaSplitting: 0
71 | overridden: 0
72 | androidETC2FallbackOverride: 0
73 | forceMaximumCompressionQuality_BC6H_BC7: 0
74 | spriteSheet:
75 | serializedVersion: 2
76 | sprites: []
77 | outline: []
78 | physicsShape: []
79 | bones: []
80 | spriteID:
81 | internalID: 0
82 | vertices: []
83 | indices:
84 | edges: []
85 | weights: []
86 | secondaryTextures: []
87 | spritePackingTag:
88 | pSDRemoveMatte: 0
89 | pSDShowRemoveMatteOption: 0
90 | userData:
91 | assetBundleName:
92 | assetBundleVariant:
93 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Textures/texture2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Unity-Technologies/com.unity.material-switch/8eb80129ed462ce1821328bf2509c683ea283392/MaterialSwitch~/Assets/Textures/texture2.png
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Textures/texture2.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8b827eb70045f3b4e91f0dcda7f914ff
3 | TextureImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 11
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 1
10 | sRGBTexture: 1
11 | linearTexture: 0
12 | fadeOut: 0
13 | borderMipMap: 0
14 | mipMapsPreserveCoverage: 0
15 | alphaTestReferenceValue: 0.5
16 | mipMapFadeDistanceStart: 1
17 | mipMapFadeDistanceEnd: 3
18 | bumpmap:
19 | convertToNormalMap: 0
20 | externalNormalMap: 0
21 | heightScale: 0.25
22 | normalMapFilter: 0
23 | isReadable: 0
24 | streamingMipmaps: 0
25 | streamingMipmapsPriority: 0
26 | grayScaleToAlpha: 0
27 | generateCubemap: 6
28 | cubemapConvolution: 0
29 | seamlessCubemap: 0
30 | textureFormat: 1
31 | maxTextureSize: 2048
32 | textureSettings:
33 | serializedVersion: 2
34 | filterMode: -1
35 | aniso: -1
36 | mipBias: -100
37 | wrapU: -1
38 | wrapV: -1
39 | wrapW: -1
40 | nPOTScale: 1
41 | lightmap: 0
42 | compressionQuality: 50
43 | spriteMode: 0
44 | spriteExtrude: 1
45 | spriteMeshType: 1
46 | alignment: 0
47 | spritePivot: {x: 0.5, y: 0.5}
48 | spritePixelsToUnits: 100
49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
50 | spriteGenerateFallbackPhysicsShape: 1
51 | alphaUsage: 1
52 | alphaIsTransparency: 0
53 | spriteTessellationDetail: -1
54 | textureType: 0
55 | textureShape: 1
56 | singleChannelComponent: 0
57 | maxTextureSizeSet: 0
58 | compressionQualitySet: 0
59 | textureFormatSet: 0
60 | applyGammaDecoding: 0
61 | platformSettings:
62 | - serializedVersion: 3
63 | buildTarget: DefaultTexturePlatform
64 | maxTextureSize: 2048
65 | resizeAlgorithm: 0
66 | textureFormat: -1
67 | textureCompression: 1
68 | compressionQuality: 50
69 | crunchedCompression: 0
70 | allowsAlphaSplitting: 0
71 | overridden: 0
72 | androidETC2FallbackOverride: 0
73 | forceMaximumCompressionQuality_BC6H_BC7: 0
74 | spriteSheet:
75 | serializedVersion: 2
76 | sprites: []
77 | outline: []
78 | physicsShape: []
79 | bones: []
80 | spriteID:
81 | internalID: 0
82 | vertices: []
83 | indices:
84 | edges: []
85 | weights: []
86 | secondaryTextures: []
87 | spritePackingTag:
88 | pSDRemoveMatte: 0
89 | pSDShowRemoveMatteOption: 0
90 | userData:
91 | assetBundleName:
92 | assetBundleVariant:
93 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Textures/texture3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Unity-Technologies/com.unity.material-switch/8eb80129ed462ce1821328bf2509c683ea283392/MaterialSwitch~/Assets/Textures/texture3.png
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Textures/texture3.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4725acc979f15fd45a7b9533e93b3391
3 | TextureImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 11
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 1
10 | sRGBTexture: 1
11 | linearTexture: 0
12 | fadeOut: 0
13 | borderMipMap: 0
14 | mipMapsPreserveCoverage: 0
15 | alphaTestReferenceValue: 0.5
16 | mipMapFadeDistanceStart: 1
17 | mipMapFadeDistanceEnd: 3
18 | bumpmap:
19 | convertToNormalMap: 0
20 | externalNormalMap: 0
21 | heightScale: 0.25
22 | normalMapFilter: 0
23 | isReadable: 0
24 | streamingMipmaps: 0
25 | streamingMipmapsPriority: 0
26 | grayScaleToAlpha: 0
27 | generateCubemap: 6
28 | cubemapConvolution: 0
29 | seamlessCubemap: 0
30 | textureFormat: 1
31 | maxTextureSize: 2048
32 | textureSettings:
33 | serializedVersion: 2
34 | filterMode: -1
35 | aniso: -1
36 | mipBias: -100
37 | wrapU: -1
38 | wrapV: -1
39 | wrapW: -1
40 | nPOTScale: 1
41 | lightmap: 0
42 | compressionQuality: 50
43 | spriteMode: 0
44 | spriteExtrude: 1
45 | spriteMeshType: 1
46 | alignment: 0
47 | spritePivot: {x: 0.5, y: 0.5}
48 | spritePixelsToUnits: 100
49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
50 | spriteGenerateFallbackPhysicsShape: 1
51 | alphaUsage: 1
52 | alphaIsTransparency: 0
53 | spriteTessellationDetail: -1
54 | textureType: 0
55 | textureShape: 1
56 | singleChannelComponent: 0
57 | maxTextureSizeSet: 0
58 | compressionQualitySet: 0
59 | textureFormatSet: 0
60 | applyGammaDecoding: 0
61 | platformSettings:
62 | - serializedVersion: 3
63 | buildTarget: DefaultTexturePlatform
64 | maxTextureSize: 2048
65 | resizeAlgorithm: 0
66 | textureFormat: -1
67 | textureCompression: 1
68 | compressionQuality: 50
69 | crunchedCompression: 0
70 | allowsAlphaSplitting: 0
71 | overridden: 0
72 | androidETC2FallbackOverride: 0
73 | forceMaximumCompressionQuality_BC6H_BC7: 0
74 | spriteSheet:
75 | serializedVersion: 2
76 | sprites: []
77 | outline: []
78 | physicsShape: []
79 | bones: []
80 | spriteID:
81 | internalID: 0
82 | vertices: []
83 | indices:
84 | edges: []
85 | weights: []
86 | secondaryTextures: []
87 | spritePackingTag:
88 | pSDRemoveMatte: 0
89 | pSDShowRemoveMatteOption: 0
90 | userData:
91 | assetBundleName:
92 | assetBundleVariant:
93 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Textures/texture4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Unity-Technologies/com.unity.material-switch/8eb80129ed462ce1821328bf2509c683ea283392/MaterialSwitch~/Assets/Textures/texture4.png
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Textures/texture4.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bbe2dc84ef6479b4ebc5feb4dcbb810f
3 | TextureImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 11
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 1
10 | sRGBTexture: 1
11 | linearTexture: 0
12 | fadeOut: 0
13 | borderMipMap: 0
14 | mipMapsPreserveCoverage: 0
15 | alphaTestReferenceValue: 0.5
16 | mipMapFadeDistanceStart: 1
17 | mipMapFadeDistanceEnd: 3
18 | bumpmap:
19 | convertToNormalMap: 0
20 | externalNormalMap: 0
21 | heightScale: 0.25
22 | normalMapFilter: 0
23 | isReadable: 0
24 | streamingMipmaps: 0
25 | streamingMipmapsPriority: 0
26 | grayScaleToAlpha: 0
27 | generateCubemap: 6
28 | cubemapConvolution: 0
29 | seamlessCubemap: 0
30 | textureFormat: 1
31 | maxTextureSize: 2048
32 | textureSettings:
33 | serializedVersion: 2
34 | filterMode: -1
35 | aniso: -1
36 | mipBias: -100
37 | wrapU: -1
38 | wrapV: -1
39 | wrapW: -1
40 | nPOTScale: 1
41 | lightmap: 0
42 | compressionQuality: 50
43 | spriteMode: 0
44 | spriteExtrude: 1
45 | spriteMeshType: 1
46 | alignment: 0
47 | spritePivot: {x: 0.5, y: 0.5}
48 | spritePixelsToUnits: 100
49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
50 | spriteGenerateFallbackPhysicsShape: 1
51 | alphaUsage: 1
52 | alphaIsTransparency: 0
53 | spriteTessellationDetail: -1
54 | textureType: 0
55 | textureShape: 1
56 | singleChannelComponent: 0
57 | maxTextureSizeSet: 0
58 | compressionQualitySet: 0
59 | textureFormatSet: 0
60 | applyGammaDecoding: 0
61 | platformSettings:
62 | - serializedVersion: 3
63 | buildTarget: DefaultTexturePlatform
64 | maxTextureSize: 2048
65 | resizeAlgorithm: 0
66 | textureFormat: -1
67 | textureCompression: 1
68 | compressionQuality: 50
69 | crunchedCompression: 0
70 | allowsAlphaSplitting: 0
71 | overridden: 0
72 | androidETC2FallbackOverride: 0
73 | forceMaximumCompressionQuality_BC6H_BC7: 0
74 | spriteSheet:
75 | serializedVersion: 2
76 | sprites: []
77 | outline: []
78 | physicsShape: []
79 | bones: []
80 | spriteID:
81 | internalID: 0
82 | vertices: []
83 | indices:
84 | edges: []
85 | weights: []
86 | secondaryTextures: []
87 | spritePackingTag:
88 | pSDRemoveMatte: 0
89 | pSDShowRemoveMatteOption: 0
90 | userData:
91 | assetBundleName:
92 | assetBundleVariant:
93 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Textures/texture5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Unity-Technologies/com.unity.material-switch/8eb80129ed462ce1821328bf2509c683ea283392/MaterialSwitch~/Assets/Textures/texture5.png
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Textures/texture5.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 315c64bc08872824a923d4218f9c530a
3 | TextureImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 11
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 1
10 | sRGBTexture: 1
11 | linearTexture: 0
12 | fadeOut: 0
13 | borderMipMap: 0
14 | mipMapsPreserveCoverage: 0
15 | alphaTestReferenceValue: 0.5
16 | mipMapFadeDistanceStart: 1
17 | mipMapFadeDistanceEnd: 3
18 | bumpmap:
19 | convertToNormalMap: 0
20 | externalNormalMap: 0
21 | heightScale: 0.25
22 | normalMapFilter: 0
23 | isReadable: 0
24 | streamingMipmaps: 0
25 | streamingMipmapsPriority: 0
26 | grayScaleToAlpha: 0
27 | generateCubemap: 6
28 | cubemapConvolution: 0
29 | seamlessCubemap: 0
30 | textureFormat: 1
31 | maxTextureSize: 2048
32 | textureSettings:
33 | serializedVersion: 2
34 | filterMode: -1
35 | aniso: -1
36 | mipBias: -100
37 | wrapU: -1
38 | wrapV: -1
39 | wrapW: -1
40 | nPOTScale: 1
41 | lightmap: 0
42 | compressionQuality: 50
43 | spriteMode: 0
44 | spriteExtrude: 1
45 | spriteMeshType: 1
46 | alignment: 0
47 | spritePivot: {x: 0.5, y: 0.5}
48 | spritePixelsToUnits: 100
49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
50 | spriteGenerateFallbackPhysicsShape: 1
51 | alphaUsage: 1
52 | alphaIsTransparency: 0
53 | spriteTessellationDetail: -1
54 | textureType: 0
55 | textureShape: 1
56 | singleChannelComponent: 0
57 | maxTextureSizeSet: 0
58 | compressionQualitySet: 0
59 | textureFormatSet: 0
60 | applyGammaDecoding: 0
61 | platformSettings:
62 | - serializedVersion: 3
63 | buildTarget: DefaultTexturePlatform
64 | maxTextureSize: 2048
65 | resizeAlgorithm: 0
66 | textureFormat: -1
67 | textureCompression: 1
68 | compressionQuality: 50
69 | crunchedCompression: 0
70 | allowsAlphaSplitting: 0
71 | overridden: 0
72 | androidETC2FallbackOverride: 0
73 | forceMaximumCompressionQuality_BC6H_BC7: 0
74 | spriteSheet:
75 | serializedVersion: 2
76 | sprites: []
77 | outline: []
78 | physicsShape: []
79 | bones: []
80 | spriteID:
81 | internalID: 0
82 | vertices: []
83 | indices:
84 | edges: []
85 | weights: []
86 | secondaryTextures: []
87 | spritePackingTag:
88 | pSDRemoveMatte: 0
89 | pSDShowRemoveMatteOption: 0
90 | userData:
91 | assetBundleName:
92 | assetBundleVariant:
93 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Textures/texture6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Unity-Technologies/com.unity.material-switch/8eb80129ed462ce1821328bf2509c683ea283392/MaterialSwitch~/Assets/Textures/texture6.png
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Textures/texture6.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b4d8f4a2071b0214e9d3c593ce7d5054
3 | TextureImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 11
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 1
10 | sRGBTexture: 1
11 | linearTexture: 0
12 | fadeOut: 0
13 | borderMipMap: 0
14 | mipMapsPreserveCoverage: 0
15 | alphaTestReferenceValue: 0.5
16 | mipMapFadeDistanceStart: 1
17 | mipMapFadeDistanceEnd: 3
18 | bumpmap:
19 | convertToNormalMap: 0
20 | externalNormalMap: 0
21 | heightScale: 0.25
22 | normalMapFilter: 0
23 | isReadable: 0
24 | streamingMipmaps: 0
25 | streamingMipmapsPriority: 0
26 | grayScaleToAlpha: 0
27 | generateCubemap: 6
28 | cubemapConvolution: 0
29 | seamlessCubemap: 0
30 | textureFormat: 1
31 | maxTextureSize: 2048
32 | textureSettings:
33 | serializedVersion: 2
34 | filterMode: -1
35 | aniso: -1
36 | mipBias: -100
37 | wrapU: -1
38 | wrapV: -1
39 | wrapW: -1
40 | nPOTScale: 1
41 | lightmap: 0
42 | compressionQuality: 50
43 | spriteMode: 0
44 | spriteExtrude: 1
45 | spriteMeshType: 1
46 | alignment: 0
47 | spritePivot: {x: 0.5, y: 0.5}
48 | spritePixelsToUnits: 100
49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
50 | spriteGenerateFallbackPhysicsShape: 1
51 | alphaUsage: 1
52 | alphaIsTransparency: 0
53 | spriteTessellationDetail: -1
54 | textureType: 0
55 | textureShape: 1
56 | singleChannelComponent: 0
57 | maxTextureSizeSet: 0
58 | compressionQualitySet: 0
59 | textureFormatSet: 0
60 | applyGammaDecoding: 0
61 | platformSettings:
62 | - serializedVersion: 3
63 | buildTarget: DefaultTexturePlatform
64 | maxTextureSize: 2048
65 | resizeAlgorithm: 0
66 | textureFormat: -1
67 | textureCompression: 1
68 | compressionQuality: 50
69 | crunchedCompression: 0
70 | allowsAlphaSplitting: 0
71 | overridden: 0
72 | androidETC2FallbackOverride: 0
73 | forceMaximumCompressionQuality_BC6H_BC7: 0
74 | spriteSheet:
75 | serializedVersion: 2
76 | sprites: []
77 | outline: []
78 | physicsShape: []
79 | bones: []
80 | spriteID:
81 | internalID: 0
82 | vertices: []
83 | indices:
84 | edges: []
85 | weights: []
86 | secondaryTextures: []
87 | spritePackingTag:
88 | pSDRemoveMatte: 0
89 | pSDShowRemoveMatteOption: 0
90 | userData:
91 | assetBundleName:
92 | assetBundleVariant:
93 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Textures/texture7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Unity-Technologies/com.unity.material-switch/8eb80129ed462ce1821328bf2509c683ea283392/MaterialSwitch~/Assets/Textures/texture7.png
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Textures/texture7.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 85526ee756d3f044f821c5ed9aae6fd8
3 | TextureImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 11
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 1
10 | sRGBTexture: 1
11 | linearTexture: 0
12 | fadeOut: 0
13 | borderMipMap: 0
14 | mipMapsPreserveCoverage: 0
15 | alphaTestReferenceValue: 0.5
16 | mipMapFadeDistanceStart: 1
17 | mipMapFadeDistanceEnd: 3
18 | bumpmap:
19 | convertToNormalMap: 0
20 | externalNormalMap: 0
21 | heightScale: 0.25
22 | normalMapFilter: 0
23 | isReadable: 0
24 | streamingMipmaps: 0
25 | streamingMipmapsPriority: 0
26 | grayScaleToAlpha: 0
27 | generateCubemap: 6
28 | cubemapConvolution: 0
29 | seamlessCubemap: 0
30 | textureFormat: 1
31 | maxTextureSize: 2048
32 | textureSettings:
33 | serializedVersion: 2
34 | filterMode: -1
35 | aniso: -1
36 | mipBias: -100
37 | wrapU: -1
38 | wrapV: -1
39 | wrapW: -1
40 | nPOTScale: 1
41 | lightmap: 0
42 | compressionQuality: 50
43 | spriteMode: 0
44 | spriteExtrude: 1
45 | spriteMeshType: 1
46 | alignment: 0
47 | spritePivot: {x: 0.5, y: 0.5}
48 | spritePixelsToUnits: 100
49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
50 | spriteGenerateFallbackPhysicsShape: 1
51 | alphaUsage: 1
52 | alphaIsTransparency: 0
53 | spriteTessellationDetail: -1
54 | textureType: 0
55 | textureShape: 1
56 | singleChannelComponent: 0
57 | maxTextureSizeSet: 0
58 | compressionQualitySet: 0
59 | textureFormatSet: 0
60 | applyGammaDecoding: 0
61 | platformSettings:
62 | - serializedVersion: 3
63 | buildTarget: DefaultTexturePlatform
64 | maxTextureSize: 2048
65 | resizeAlgorithm: 0
66 | textureFormat: -1
67 | textureCompression: 1
68 | compressionQuality: 50
69 | crunchedCompression: 0
70 | allowsAlphaSplitting: 0
71 | overridden: 0
72 | androidETC2FallbackOverride: 0
73 | forceMaximumCompressionQuality_BC6H_BC7: 0
74 | spriteSheet:
75 | serializedVersion: 2
76 | sprites: []
77 | outline: []
78 | physicsShape: []
79 | bones: []
80 | spriteID:
81 | internalID: 0
82 | vertices: []
83 | indices:
84 | edges: []
85 | weights: []
86 | secondaryTextures: []
87 | spritePackingTag:
88 | pSDRemoveMatte: 0
89 | pSDShowRemoveMatteOption: 0
90 | userData:
91 | assetBundleName:
92 | assetBundleVariant:
93 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Textures/texture8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Unity-Technologies/com.unity.material-switch/8eb80129ed462ce1821328bf2509c683ea283392/MaterialSwitch~/Assets/Textures/texture8.png
--------------------------------------------------------------------------------
/MaterialSwitch~/Assets/Textures/texture8.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ebe5e9d092f8048409457e4fa541fca6
3 | TextureImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 11
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 1
10 | sRGBTexture: 1
11 | linearTexture: 0
12 | fadeOut: 0
13 | borderMipMap: 0
14 | mipMapsPreserveCoverage: 0
15 | alphaTestReferenceValue: 0.5
16 | mipMapFadeDistanceStart: 1
17 | mipMapFadeDistanceEnd: 3
18 | bumpmap:
19 | convertToNormalMap: 0
20 | externalNormalMap: 0
21 | heightScale: 0.25
22 | normalMapFilter: 0
23 | isReadable: 0
24 | streamingMipmaps: 0
25 | streamingMipmapsPriority: 0
26 | grayScaleToAlpha: 0
27 | generateCubemap: 6
28 | cubemapConvolution: 0
29 | seamlessCubemap: 0
30 | textureFormat: 1
31 | maxTextureSize: 2048
32 | textureSettings:
33 | serializedVersion: 2
34 | filterMode: -1
35 | aniso: -1
36 | mipBias: -100
37 | wrapU: -1
38 | wrapV: -1
39 | wrapW: -1
40 | nPOTScale: 1
41 | lightmap: 0
42 | compressionQuality: 50
43 | spriteMode: 0
44 | spriteExtrude: 1
45 | spriteMeshType: 1
46 | alignment: 0
47 | spritePivot: {x: 0.5, y: 0.5}
48 | spritePixelsToUnits: 100
49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
50 | spriteGenerateFallbackPhysicsShape: 1
51 | alphaUsage: 1
52 | alphaIsTransparency: 0
53 | spriteTessellationDetail: -1
54 | textureType: 0
55 | textureShape: 1
56 | singleChannelComponent: 0
57 | maxTextureSizeSet: 0
58 | compressionQualitySet: 0
59 | textureFormatSet: 0
60 | applyGammaDecoding: 0
61 | platformSettings:
62 | - serializedVersion: 3
63 | buildTarget: DefaultTexturePlatform
64 | maxTextureSize: 2048
65 | resizeAlgorithm: 0
66 | textureFormat: -1
67 | textureCompression: 1
68 | compressionQuality: 50
69 | crunchedCompression: 0
70 | allowsAlphaSplitting: 0
71 | overridden: 0
72 | androidETC2FallbackOverride: 0
73 | forceMaximumCompressionQuality_BC6H_BC7: 0
74 | spriteSheet:
75 | serializedVersion: 2
76 | sprites: []
77 | outline: []
78 | physicsShape: []
79 | bones: []
80 | spriteID:
81 | internalID: 0
82 | vertices: []
83 | indices:
84 | edges: []
85 | weights: []
86 | secondaryTextures: []
87 | spritePackingTag:
88 | pSDRemoveMatte: 0
89 | pSDShowRemoveMatteOption: 0
90 | userData:
91 | assetBundleName:
92 | assetBundleVariant:
93 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Packages/com.unity.material-switch/CHANGELOG.md.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fa030f2878ac3974ebab21cee6fc950d
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Packages/com.unity.material-switch/Documentation~:
--------------------------------------------------------------------------------
1 | ../../../Documentation~
--------------------------------------------------------------------------------
/MaterialSwitch~/Packages/com.unity.material-switch/Editor:
--------------------------------------------------------------------------------
1 | ../../../Editor
--------------------------------------------------------------------------------
/MaterialSwitch~/Packages/com.unity.material-switch/Editor.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f40bb795aa68775459061b58164ab9a0
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Packages/com.unity.material-switch/LICENSE.md:
--------------------------------------------------------------------------------
1 | Material Switch copyright © 2020 Unity Technologies ApS
2 |
3 | Licensed under the Unity Companion License for Unity-dependent projects--see [Unity Companion License](http://www.unity3d.com/legal/licenses/Unity_Companion_License).
4 |
5 | Unless expressly provided otherwise, the Software under this license is made available strictly on an “AS IS” BASIS WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. Please review the license for details on these and other terms and conditions.
6 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Packages/com.unity.material-switch/LICENSE.md.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 472bea459083c314abd649eb7792f7bc
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Packages/com.unity.material-switch/Runtime:
--------------------------------------------------------------------------------
1 | ../../../Runtime
--------------------------------------------------------------------------------
/MaterialSwitch~/Packages/com.unity.material-switch/Runtime.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6b59064c2e839c4418073e770d74dd2a
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Packages/com.unity.material-switch/Shaders:
--------------------------------------------------------------------------------
1 | ../../../Shaders
--------------------------------------------------------------------------------
/MaterialSwitch~/Packages/com.unity.material-switch/Shaders.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 95974b4660b9fb64bb6b2b837a17ad24
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Packages/com.unity.material-switch/Tests:
--------------------------------------------------------------------------------
1 | ../../../Tests
--------------------------------------------------------------------------------
/MaterialSwitch~/Packages/com.unity.material-switch/Tests.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e56a054c931f39d4684d4fecd0fa4399
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Packages/com.unity.material-switch/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "displayName": "Material Switch",
3 | "name": "com.unity.material-switch",
4 | "unity": "2021.3",
5 | "version": "0.10.0-preview",
6 | "description": "Provides tools for switching and blending material parameters over a number of renderers simultaneously using Timeline.",
7 | "contributors": [
8 | "Simon Wittber (https://github.com/smnwttbr)",
9 | "Sindharta Tanuwijaya (https://github.com/sindharta)",
10 | "Unity Technologies Japan"
11 | ],
12 | "dependencies": {
13 | "com.unity.film-internal-utilities": "0.18.4-preview",
14 | "com.unity.selection-groups": "0.8.0-preview",
15 | "com.unity.timeline": "1.5.7"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Packages/com.unity.material-switch/package.json.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bb86d0b1cb553ce418147e9659ed9f6e
3 | PackageManifestImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/MaterialSwitch~/Packages/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "com.unity.collab-proxy": "2.0.1",
4 | "com.unity.ext.nunit": "1.0.6",
5 | "com.unity.ide.rider": "3.0.18",
6 | "com.unity.ide.visualstudio": "2.0.17",
7 | "com.unity.ide.vscode": "1.2.5",
8 | "com.unity.test-framework": "1.1.33",
9 | "com.unity.textmeshpro": "3.0.6",
10 | "com.unity.timeline": "1.5.6",
11 | "com.unity.toonshader": "0.9.0-preview",
12 | "com.unity.ugui": "1.0.0",
13 | "com.unity.modules.ai": "1.0.0",
14 | "com.unity.modules.androidjni": "1.0.0",
15 | "com.unity.modules.animation": "1.0.0",
16 | "com.unity.modules.assetbundle": "1.0.0",
17 | "com.unity.modules.audio": "1.0.0",
18 | "com.unity.modules.cloth": "1.0.0",
19 | "com.unity.modules.director": "1.0.0",
20 | "com.unity.modules.imageconversion": "1.0.0",
21 | "com.unity.modules.imgui": "1.0.0",
22 | "com.unity.modules.jsonserialize": "1.0.0",
23 | "com.unity.modules.particlesystem": "1.0.0",
24 | "com.unity.modules.physics": "1.0.0",
25 | "com.unity.modules.physics2d": "1.0.0",
26 | "com.unity.modules.screencapture": "1.0.0",
27 | "com.unity.modules.terrain": "1.0.0",
28 | "com.unity.modules.terrainphysics": "1.0.0",
29 | "com.unity.modules.tilemap": "1.0.0",
30 | "com.unity.modules.ui": "1.0.0",
31 | "com.unity.modules.uielements": "1.0.0",
32 | "com.unity.modules.umbra": "1.0.0",
33 | "com.unity.modules.unityanalytics": "1.0.0",
34 | "com.unity.modules.unitywebrequest": "1.0.0",
35 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
36 | "com.unity.modules.unitywebrequestaudio": "1.0.0",
37 | "com.unity.modules.unitywebrequesttexture": "1.0.0",
38 | "com.unity.modules.unitywebrequestwww": "1.0.0",
39 | "com.unity.modules.vehicles": "1.0.0",
40 | "com.unity.modules.video": "1.0.0",
41 | "com.unity.modules.vr": "1.0.0",
42 | "com.unity.modules.wind": "1.0.0",
43 | "com.unity.modules.xr": "1.0.0"
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/MaterialSwitch~/ProjectSettings/AudioManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!11 &1
4 | AudioManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Volume: 1
8 | Rolloff Scale: 1
9 | Doppler Factor: 1
10 | Default Speaker Mode: 2
11 | m_SampleRate: 0
12 | m_DSPBufferSize: 1024
13 | m_VirtualVoiceCount: 512
14 | m_RealVoiceCount: 32
15 | m_SpatializerPlugin:
16 | m_AmbisonicDecoderPlugin:
17 | m_DisableAudio: 0
18 | m_VirtualizeEffects: 1
19 | m_RequestedDSPBufferSize: 1024
20 |
--------------------------------------------------------------------------------
/MaterialSwitch~/ProjectSettings/ClusterInputManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!236 &1
4 | ClusterInputManager:
5 | m_ObjectHideFlags: 0
6 | m_Inputs: []
7 |
--------------------------------------------------------------------------------
/MaterialSwitch~/ProjectSettings/DynamicsManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!55 &1
4 | PhysicsManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 11
7 | m_Gravity: {x: 0, y: -9.81, z: 0}
8 | m_DefaultMaterial: {fileID: 0}
9 | m_BounceThreshold: 2
10 | m_SleepThreshold: 0.005
11 | m_DefaultContactOffset: 0.01
12 | m_DefaultSolverIterations: 6
13 | m_DefaultSolverVelocityIterations: 1
14 | m_QueriesHitBackfaces: 0
15 | m_QueriesHitTriggers: 1
16 | m_EnableAdaptiveForce: 0
17 | m_ClothInterCollisionDistance: 0
18 | m_ClothInterCollisionStiffness: 0
19 | m_ContactsGeneration: 1
20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
21 | m_AutoSimulation: 1
22 | m_AutoSyncTransforms: 0
23 | m_ReuseCollisionCallbacks: 1
24 | m_ClothInterCollisionSettingsToggle: 0
25 | m_ContactPairsMode: 0
26 | m_BroadphaseType: 0
27 | m_WorldBounds:
28 | m_Center: {x: 0, y: 0, z: 0}
29 | m_Extent: {x: 250, y: 250, z: 250}
30 | m_WorldSubdivisions: 8
31 | m_FrictionType: 0
32 | m_EnableEnhancedDeterminism: 0
33 | m_EnableUnifiedHeightmaps: 1
34 | m_DefaultMaxAngluarSpeed: 7
35 |
--------------------------------------------------------------------------------
/MaterialSwitch~/ProjectSettings/EditorBuildSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1045 &1
4 | EditorBuildSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Scenes: []
8 | m_configObjects: {}
9 |
--------------------------------------------------------------------------------
/MaterialSwitch~/ProjectSettings/EditorSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!159 &1
4 | EditorSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 9
7 | m_ExternalVersionControlSupport: Hidden Meta Files
8 | m_SerializationMode: 2
9 | m_LineEndingsForNewScripts: 2
10 | m_DefaultBehaviorMode: 0
11 | m_PrefabRegularEnvironment: {fileID: 0}
12 | m_PrefabUIEnvironment: {fileID: 0}
13 | m_SpritePackerMode: 0
14 | m_SpritePackerPaddingPower: 1
15 | m_EtcTextureCompressorBehavior: 1
16 | m_EtcTextureFastCompressor: 1
17 | m_EtcTextureNormalCompressor: 2
18 | m_EtcTextureBestCompressor: 4
19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref
20 | m_ProjectGenerationRootNamespace:
21 | m_CollabEditorSettings:
22 | inProgressEnabled: 1
23 | m_EnableTextureStreamingInEditMode: 1
24 | m_EnableTextureStreamingInPlayMode: 1
25 | m_AsyncShaderCompilation: 1
26 | m_EnterPlayModeOptionsEnabled: 0
27 | m_EnterPlayModeOptions: 3
28 | m_ShowLightmapResolutionOverlay: 1
29 | m_UseLegacyProbeSampleCount: 1
30 | m_AssetPipelineMode: 1
31 | m_CacheServerMode: 0
32 | m_CacheServerEndpoint:
33 | m_CacheServerNamespacePrefix: default
34 | m_CacheServerEnableDownload: 1
35 | m_CacheServerEnableUpload: 1
36 |
--------------------------------------------------------------------------------
/MaterialSwitch~/ProjectSettings/GraphicsSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!30 &1
4 | GraphicsSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 13
7 | m_Deferred:
8 | m_Mode: 1
9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0}
10 | m_DeferredReflections:
11 | m_Mode: 1
12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0}
13 | m_ScreenSpaceShadows:
14 | m_Mode: 1
15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0}
16 | m_LegacyDeferred:
17 | m_Mode: 1
18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0}
19 | m_DepthNormals:
20 | m_Mode: 1
21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0}
22 | m_MotionVectors:
23 | m_Mode: 1
24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0}
25 | m_LightHalo:
26 | m_Mode: 1
27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0}
28 | m_LensFlare:
29 | m_Mode: 1
30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0}
31 | m_AlwaysIncludedShaders:
32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0}
33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0}
34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0}
35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0}
36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
38 | - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0}
39 | - {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0}
40 | - {fileID: 16002, guid: 0000000000000000f000000000000000, type: 0}
41 | - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0}
42 | m_PreloadedShaders: []
43 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
44 | type: 0}
45 | m_CustomRenderPipeline: {fileID: 0}
46 | m_TransparencySortMode: 0
47 | m_TransparencySortAxis: {x: 0, y: 0, z: 1}
48 | m_DefaultRenderingPath: 1
49 | m_DefaultMobileRenderingPath: 1
50 | m_TierSettings: []
51 | m_LightmapStripping: 0
52 | m_FogStripping: 0
53 | m_InstancingStripping: 0
54 | m_LightmapKeepPlain: 1
55 | m_LightmapKeepDirCombined: 1
56 | m_LightmapKeepDynamicPlain: 1
57 | m_LightmapKeepDynamicDirCombined: 1
58 | m_LightmapKeepShadowMask: 1
59 | m_LightmapKeepSubtractive: 1
60 | m_FogKeepLinear: 1
61 | m_FogKeepExp: 1
62 | m_FogKeepExp2: 1
63 | m_AlbedoSwatchInfos: []
64 | m_LightsUseLinearIntensity: 0
65 | m_LightsUseColorTemperature: 0
66 | m_LogWhenShaderIsCompiled: 0
67 | m_AllowEnlightenSupportForUpgradedProject: 1
68 |
--------------------------------------------------------------------------------
/MaterialSwitch~/ProjectSettings/NavMeshAreas.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!126 &1
4 | NavMeshProjectSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | areas:
8 | - name: Walkable
9 | cost: 1
10 | - name: Not Walkable
11 | cost: 1
12 | - name: Jump
13 | cost: 2
14 | - name:
15 | cost: 1
16 | - name:
17 | cost: 1
18 | - name:
19 | cost: 1
20 | - name:
21 | cost: 1
22 | - name:
23 | cost: 1
24 | - name:
25 | cost: 1
26 | - name:
27 | cost: 1
28 | - name:
29 | cost: 1
30 | - name:
31 | cost: 1
32 | - name:
33 | cost: 1
34 | - name:
35 | cost: 1
36 | - name:
37 | cost: 1
38 | - name:
39 | cost: 1
40 | - name:
41 | cost: 1
42 | - name:
43 | cost: 1
44 | - name:
45 | cost: 1
46 | - name:
47 | cost: 1
48 | - name:
49 | cost: 1
50 | - name:
51 | cost: 1
52 | - name:
53 | cost: 1
54 | - name:
55 | cost: 1
56 | - name:
57 | cost: 1
58 | - name:
59 | cost: 1
60 | - name:
61 | cost: 1
62 | - name:
63 | cost: 1
64 | - name:
65 | cost: 1
66 | - name:
67 | cost: 1
68 | - name:
69 | cost: 1
70 | - name:
71 | cost: 1
72 | m_LastAgentTypeID: -887442657
73 | m_Settings:
74 | - serializedVersion: 2
75 | agentTypeID: 0
76 | agentRadius: 0.5
77 | agentHeight: 2
78 | agentSlope: 45
79 | agentClimb: 0.75
80 | ledgeDropHeight: 0
81 | maxJumpAcrossDistance: 0
82 | minRegionArea: 2
83 | manualCellSize: 0
84 | cellSize: 0.16666667
85 | manualTileSize: 0
86 | tileSize: 256
87 | accuratePlacement: 0
88 | debug:
89 | m_Flags: 0
90 | m_SettingNames:
91 | - Humanoid
92 |
--------------------------------------------------------------------------------
/MaterialSwitch~/ProjectSettings/PackageManagerSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &1
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 61
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0}
13 | m_Name:
14 | m_EditorClassIdentifier:
15 | m_EnablePreviewPackages: 0
16 | m_EnablePackageDependencies: 0
17 | m_AdvancedSettingsExpanded: 1
18 | m_ScopedRegistriesSettingsExpanded: 1
19 | oneTimeWarningShown: 0
20 | m_Registries:
21 | - m_Id: main
22 | m_Name:
23 | m_Url: https://packages.unity.com
24 | m_Scopes: []
25 | m_IsDefault: 1
26 | m_Capabilities: 7
27 | m_UserSelectedRegistryName:
28 | m_UserAddingNewScopedRegistry: 0
29 | m_RegistryInfoDraft:
30 | m_ErrorMessage:
31 | m_Original:
32 | m_Id:
33 | m_Name:
34 | m_Url:
35 | m_Scopes: []
36 | m_IsDefault: 0
37 | m_Capabilities: 0
38 | m_Modified: 0
39 | m_Name:
40 | m_Url:
41 | m_Scopes:
42 | -
43 | m_SelectedScopeIndex: 0
44 |
--------------------------------------------------------------------------------
/MaterialSwitch~/ProjectSettings/Physics2DSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!19 &1
4 | Physics2DSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 4
7 | m_Gravity: {x: 0, y: -9.81}
8 | m_DefaultMaterial: {fileID: 0}
9 | m_VelocityIterations: 8
10 | m_PositionIterations: 3
11 | m_VelocityThreshold: 1
12 | m_MaxLinearCorrection: 0.2
13 | m_MaxAngularCorrection: 8
14 | m_MaxTranslationSpeed: 100
15 | m_MaxRotationSpeed: 360
16 | m_BaumgarteScale: 0.2
17 | m_BaumgarteTimeOfImpactScale: 0.75
18 | m_TimeToSleep: 0.5
19 | m_LinearSleepTolerance: 0.01
20 | m_AngularSleepTolerance: 2
21 | m_DefaultContactOffset: 0.01
22 | m_JobOptions:
23 | serializedVersion: 2
24 | useMultithreading: 0
25 | useConsistencySorting: 0
26 | m_InterpolationPosesPerJob: 100
27 | m_NewContactsPerJob: 30
28 | m_CollideContactsPerJob: 100
29 | m_ClearFlagsPerJob: 200
30 | m_ClearBodyForcesPerJob: 200
31 | m_SyncDiscreteFixturesPerJob: 50
32 | m_SyncContinuousFixturesPerJob: 50
33 | m_FindNearestContactsPerJob: 100
34 | m_UpdateTriggerContactsPerJob: 100
35 | m_IslandSolverCostThreshold: 100
36 | m_IslandSolverBodyCostScale: 1
37 | m_IslandSolverContactCostScale: 10
38 | m_IslandSolverJointCostScale: 10
39 | m_IslandSolverBodiesPerJob: 50
40 | m_IslandSolverContactsPerJob: 50
41 | m_AutoSimulation: 1
42 | m_QueriesHitTriggers: 1
43 | m_QueriesStartInColliders: 1
44 | m_CallbacksOnDisable: 1
45 | m_ReuseCollisionCallbacks: 1
46 | m_AutoSyncTransforms: 0
47 | m_AlwaysShowColliders: 0
48 | m_ShowColliderSleep: 1
49 | m_ShowColliderContacts: 0
50 | m_ShowColliderAABB: 0
51 | m_ContactArrowScale: 0.2
52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412}
53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432}
54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745}
55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804}
56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
57 |
--------------------------------------------------------------------------------
/MaterialSwitch~/ProjectSettings/PresetManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1386491679 &1
4 | PresetManager:
5 | m_ObjectHideFlags: 0
6 | m_DefaultList: []
7 |
--------------------------------------------------------------------------------
/MaterialSwitch~/ProjectSettings/ProjectVersion.txt:
--------------------------------------------------------------------------------
1 | m_EditorVersion: 2020.3.46f1
2 | m_EditorVersionWithRevision: 2020.3.46f1 (18bc01a066b4)
3 |
--------------------------------------------------------------------------------
/MaterialSwitch~/ProjectSettings/SceneTemplateSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "templatePinStates": [],
3 | "dependencyTypeInfos": [
4 | {
5 | "userAdded": false,
6 | "type": "UnityEngine.AnimationClip",
7 | "ignore": false,
8 | "defaultInstantiationMode": 0,
9 | "supportsModification": true
10 | },
11 | {
12 | "userAdded": false,
13 | "type": "UnityEditor.Animations.AnimatorController",
14 | "ignore": false,
15 | "defaultInstantiationMode": 0,
16 | "supportsModification": true
17 | },
18 | {
19 | "userAdded": false,
20 | "type": "UnityEngine.AnimatorOverrideController",
21 | "ignore": false,
22 | "defaultInstantiationMode": 0,
23 | "supportsModification": true
24 | },
25 | {
26 | "userAdded": false,
27 | "type": "UnityEditor.Audio.AudioMixerController",
28 | "ignore": false,
29 | "defaultInstantiationMode": 0,
30 | "supportsModification": true
31 | },
32 | {
33 | "userAdded": false,
34 | "type": "UnityEngine.ComputeShader",
35 | "ignore": true,
36 | "defaultInstantiationMode": 1,
37 | "supportsModification": true
38 | },
39 | {
40 | "userAdded": false,
41 | "type": "UnityEngine.Cubemap",
42 | "ignore": false,
43 | "defaultInstantiationMode": 0,
44 | "supportsModification": true
45 | },
46 | {
47 | "userAdded": false,
48 | "type": "UnityEngine.GameObject",
49 | "ignore": false,
50 | "defaultInstantiationMode": 0,
51 | "supportsModification": true
52 | },
53 | {
54 | "userAdded": false,
55 | "type": "UnityEditor.LightingDataAsset",
56 | "ignore": false,
57 | "defaultInstantiationMode": 0,
58 | "supportsModification": false
59 | },
60 | {
61 | "userAdded": false,
62 | "type": "UnityEngine.LightingSettings",
63 | "ignore": false,
64 | "defaultInstantiationMode": 0,
65 | "supportsModification": true
66 | },
67 | {
68 | "userAdded": false,
69 | "type": "UnityEngine.Material",
70 | "ignore": false,
71 | "defaultInstantiationMode": 0,
72 | "supportsModification": true
73 | },
74 | {
75 | "userAdded": false,
76 | "type": "UnityEditor.MonoScript",
77 | "ignore": true,
78 | "defaultInstantiationMode": 1,
79 | "supportsModification": true
80 | },
81 | {
82 | "userAdded": false,
83 | "type": "UnityEngine.PhysicMaterial",
84 | "ignore": false,
85 | "defaultInstantiationMode": 0,
86 | "supportsModification": true
87 | },
88 | {
89 | "userAdded": false,
90 | "type": "UnityEngine.PhysicsMaterial2D",
91 | "ignore": false,
92 | "defaultInstantiationMode": 0,
93 | "supportsModification": true
94 | },
95 | {
96 | "userAdded": false,
97 | "type": "UnityEngine.Rendering.PostProcessing.PostProcessProfile",
98 | "ignore": false,
99 | "defaultInstantiationMode": 0,
100 | "supportsModification": true
101 | },
102 | {
103 | "userAdded": false,
104 | "type": "UnityEngine.Rendering.PostProcessing.PostProcessResources",
105 | "ignore": false,
106 | "defaultInstantiationMode": 0,
107 | "supportsModification": true
108 | },
109 | {
110 | "userAdded": false,
111 | "type": "UnityEngine.Rendering.VolumeProfile",
112 | "ignore": false,
113 | "defaultInstantiationMode": 0,
114 | "supportsModification": true
115 | },
116 | {
117 | "userAdded": false,
118 | "type": "UnityEditor.SceneAsset",
119 | "ignore": false,
120 | "defaultInstantiationMode": 0,
121 | "supportsModification": false
122 | },
123 | {
124 | "userAdded": false,
125 | "type": "UnityEngine.Shader",
126 | "ignore": true,
127 | "defaultInstantiationMode": 1,
128 | "supportsModification": true
129 | },
130 | {
131 | "userAdded": false,
132 | "type": "UnityEngine.ShaderVariantCollection",
133 | "ignore": true,
134 | "defaultInstantiationMode": 1,
135 | "supportsModification": true
136 | },
137 | {
138 | "userAdded": false,
139 | "type": "UnityEngine.Texture",
140 | "ignore": false,
141 | "defaultInstantiationMode": 0,
142 | "supportsModification": true
143 | },
144 | {
145 | "userAdded": false,
146 | "type": "UnityEngine.Texture2D",
147 | "ignore": false,
148 | "defaultInstantiationMode": 0,
149 | "supportsModification": true
150 | },
151 | {
152 | "userAdded": false,
153 | "type": "UnityEngine.Timeline.TimelineAsset",
154 | "ignore": false,
155 | "defaultInstantiationMode": 0,
156 | "supportsModification": true
157 | }
158 | ],
159 | "defaultDependencyTypeInfo": {
160 | "userAdded": false,
161 | "type": "",
162 | "ignore": false,
163 | "defaultInstantiationMode": 1,
164 | "supportsModification": true
165 | },
166 | "newSceneOverride": 0
167 | }
--------------------------------------------------------------------------------
/MaterialSwitch~/ProjectSettings/SelectionGroupsSettings.asset:
--------------------------------------------------------------------------------
1 | {"m_version":1,"m_groupsVisibleInHierarchy":true}
--------------------------------------------------------------------------------
/MaterialSwitch~/ProjectSettings/TagManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!78 &1
4 | TagManager:
5 | serializedVersion: 2
6 | tags: []
7 | layers:
8 | - Default
9 | - TransparentFX
10 | - Ignore Raycast
11 | -
12 | - Water
13 | - UI
14 | -
15 | -
16 | -
17 | -
18 | -
19 | -
20 | -
21 | -
22 | -
23 | -
24 | -
25 | -
26 | -
27 | -
28 | -
29 | -
30 | -
31 | -
32 | -
33 | -
34 | -
35 | -
36 | -
37 | -
38 | -
39 | -
40 | m_SortingLayers:
41 | - name: Default
42 | uniqueID: 0
43 | locked: 0
44 |
--------------------------------------------------------------------------------
/MaterialSwitch~/ProjectSettings/TimeManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!5 &1
4 | TimeManager:
5 | m_ObjectHideFlags: 0
6 | Fixed Timestep: 0.02
7 | Maximum Allowed Timestep: 0.33333334
8 | m_TimeScale: 1
9 | Maximum Particle Timestep: 0.03
10 |
--------------------------------------------------------------------------------
/MaterialSwitch~/ProjectSettings/TimelineSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &1
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 61
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 11500000, guid: a287be6c49135cd4f9b2b8666c39d999, type: 3}
13 | m_Name:
14 | m_EditorClassIdentifier:
15 | assetDefaultFramerate: 60
16 |
--------------------------------------------------------------------------------
/MaterialSwitch~/ProjectSettings/UnityConnectSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!310 &1
4 | UnityConnectSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 1
7 | m_Enabled: 0
8 | m_TestMode: 0
9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events
10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events
11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com
12 | m_TestInitMode: 0
13 | CrashReportingSettings:
14 | m_EventUrl: https://perf-events.cloud.unity3d.com
15 | m_Enabled: 0
16 | m_LogBufferSize: 10
17 | m_CaptureEditorExceptions: 1
18 | UnityPurchasingSettings:
19 | m_Enabled: 0
20 | m_TestMode: 0
21 | UnityAnalyticsSettings:
22 | m_Enabled: 0
23 | m_TestMode: 0
24 | m_InitializeOnStartup: 1
25 | UnityAdsSettings:
26 | m_Enabled: 0
27 | m_InitializeOnStartup: 1
28 | m_TestMode: 0
29 | m_IosGameId:
30 | m_AndroidGameId:
31 | m_GameIds: {}
32 | m_GameId:
33 | PerformanceReportingSettings:
34 | m_Enabled: 0
35 |
--------------------------------------------------------------------------------
/MaterialSwitch~/ProjectSettings/VFXManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!937362698 &1
4 | VFXManager:
5 | m_ObjectHideFlags: 0
6 | m_IndirectShader: {fileID: 0}
7 | m_CopyBufferShader: {fileID: 0}
8 | m_SortShader: {fileID: 0}
9 | m_RenderPipeSettingsPath:
10 | m_FixedTimeStep: 0.016666668
11 | m_MaxDeltaTime: 0.05
12 |
--------------------------------------------------------------------------------
/MaterialSwitch~/ProjectSettings/VersionControlSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!890905787 &1
4 | VersionControlSettings:
5 | m_ObjectHideFlags: 0
6 | m_Mode: Visible Meta Files
7 | m_CollabEditorSettings:
8 | inProgressEnabled: 1
9 |
--------------------------------------------------------------------------------
/MaterialSwitch~/ProjectSettings/XRSettings.asset:
--------------------------------------------------------------------------------
1 | {
2 | "m_SettingKeys": [
3 | "VR Device Disabled",
4 | "VR Device User Alert"
5 | ],
6 | "m_SettingValues": [
7 | "False",
8 | "False"
9 | ]
10 | }
--------------------------------------------------------------------------------
/MaterialSwitch~/SelectionGroups/SelectionGroups.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &1
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 61
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 11500000, guid: 1d77bebe0cb33ec45aad7d6b9259f66e, type: 3}
13 | m_Name:
14 | m_EditorClassIdentifier:
15 | _values: []
16 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Latest official docs
2 | - [English](https://docs.unity3d.com/Packages/com.unity.material-switch@latest)
3 | - [日本語](https://docs.unity3d.com/ja/Packages/com.unity.material-switch@latest)
4 |
5 | # Material Switch
6 |
7 | ## Overview
8 |
9 | Material Switch provides tools for switching and blending material parameters over a number of renderers
10 | simultaneously using Timeline.
11 |
12 | ## Supported Unity Versions and Settings
13 |
14 | Unity 2021.3.45 or higher.
15 |
16 | Please refer to the [installation](Documentation~/installation.md) page to install MaterialSwitch package.
17 |
18 | ## Quick Start
19 |
20 | [Quick Start](Documentation~/index.md#quick-start)
21 |
22 | # Features
23 | 1. [MaterialSwitchClip](Documentation~/material-switch-clip.md)
24 | 1. [SpriteSwitchClip](Documentation~/sprite-switch-clip.md)
25 | 1. [Property Name Remap](Documentation~/property-name-remap.md)
26 |
27 | # License
28 | - [License](LICENSE.md)
29 |
30 |
--------------------------------------------------------------------------------
/README.md.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 712c94af0943cd44d999e26325f94990
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Runtime.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2a6282d3820928042be2318d61c504f8
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.CompilerServices;
2 | [assembly: InternalsVisibleTo("Unity.MaterialSwitch.Editor")]
3 | [assembly: InternalsVisibleTo("Unity.MaterialSwitch.Tests")]
4 | [assembly: InternalsVisibleTo("Unity.MaterialSwitch.EditorTests")]
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Runtime/AssemblyInfo.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8739160efc14dc54d8b332b3e0fec443
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/MaterialGroup.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using UnityEngine;
5 |
6 | #if UNITY_EDITOR
7 | using UnityEditor;
8 | #endif
9 |
10 |
11 | namespace Unity.MaterialSwitch
12 | {
13 | [AddComponentMenu("")]
14 | [ExecuteAlways]
15 | [RequireComponent(typeof(SelectionGroups.SelectionGroup))]
16 | internal class MaterialGroup : MonoBehaviour
17 | {
18 | public Material[] sharedMaterials;
19 |
20 | void OnEnable()
21 | {
22 | CollectMaterials();
23 | #if UNITY_EDITOR
24 | EditorApplication.hierarchyChanged -= CollectMaterials;
25 | EditorApplication.hierarchyChanged += CollectMaterials;
26 | #endif
27 | }
28 |
29 | void OnDisable()
30 | {
31 | #if UNITY_EDITOR
32 | EditorApplication.hierarchyChanged -= CollectMaterials;
33 | #endif
34 | }
35 |
36 | public void CollectMaterials()
37 | {
38 | var group = GetComponent();
39 | var materials = new HashSet();
40 | foreach (var i in group.GetMemberComponents())
41 | {
42 | materials.UnionWith(i.sharedMaterials);
43 | }
44 | sharedMaterials = materials.ToArray();
45 | }
46 | }
47 | }
--------------------------------------------------------------------------------
/Runtime/MaterialGroup.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3742143744debf64889905b38d82df9a
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/MaterialProperties.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using UnityEngine;
3 | using UnityEngine.Serialization;
4 |
5 | namespace Unity.MaterialSwitch
6 | {
7 | ///
8 | /// A class to store material properties
9 | ///
10 | [System.Serializable]
11 | internal class MaterialProperties
12 | {
13 | [SerializeField] internal Texture2D texture;
14 | [FormerlySerializedAs("colorCoordinates")] [SerializeField] internal List colorProperties = new List();
15 | [SerializeField] internal Material material;
16 | [SerializeField] internal bool showCoords = false;
17 | [SerializeField] internal bool showTextures = false;
18 | [SerializeField] internal bool showFloats = false;
19 | [SerializeField] internal List textureProperties = new List();
20 | [SerializeField] internal List floatProperties = new List();
21 | [SerializeField] internal bool needsUpdate = true;
22 |
23 | ///
24 | /// Enumerate all texture properties
25 | ///
26 | /// A texture property
27 | public IEnumerable GetTextureProperties()
28 | {
29 | foreach (TextureProperty t in textureProperties)
30 | yield return t;
31 | }
32 |
33 | ///
34 | /// Enumerate all float properties
35 | ///
36 | /// A float property
37 | public IEnumerable GetFloatProperties()
38 | {
39 | foreach (FloatProperty f in floatProperties)
40 | yield return f;
41 | }
42 |
43 |
44 | ///
45 | /// Enumerate all color properties
46 | ///
47 | /// A color property
48 | public IEnumerable GetColorProperties()
49 | {
50 | foreach (ColorProperty c in colorProperties)
51 | yield return c;
52 | }
53 |
54 | //----------------------------------------------------------------------------------------------------------------------
55 | internal TextureProperty FindTextureProperty(string propertyName)
56 | {
57 | return FindProperty(textureProperties, propertyName);
58 | }
59 |
60 | internal ColorProperty FindColorProperty(string propertyName)
61 | {
62 | return FindProperty(colorProperties, propertyName);
63 | }
64 |
65 | internal FloatProperty FindFloatProperty(string propertyName)
66 | {
67 | return FindProperty(floatProperties, propertyName);
68 | }
69 |
70 | private static T FindProperty(IEnumerable properties,string propertyName) where T:MaterialSwitchProperty
71 | {
72 | foreach(T p in properties)
73 | {
74 | if (p.propertyName == propertyName)
75 | return p;
76 | }
77 | return null;
78 | }
79 |
80 | //----------------------------------------------------------------------------------------------------------------------
81 |
82 | ///
83 | /// Get the material associated with the properties.
84 | ///
85 | /// The associated material
86 | public Material GetMaterial() => material;
87 |
88 | }
89 | }
--------------------------------------------------------------------------------
/Runtime/MaterialProperties.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8c9afcac4645411418aac6880de289fc
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/MaterialPropertyBlockManager.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: beb3fad2e5984346aa81c16ddc728856
3 | timeCreated: 1634872631
--------------------------------------------------------------------------------
/Runtime/MaterialPropertyNameMap.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Unity.Collections;
4 | using Unity.FilmInternalUtilities;
5 | using UnityEngine;
6 | using UnityEngine.Serialization;
7 |
8 | namespace Unity.MaterialSwitch
9 | {
10 | [CreateAssetMenu]
11 | public class MaterialPropertyNameMap : ScriptableObject, ISerializationCallbackReceiver
12 | {
13 | public Shader shader;
14 |
15 | [System.Serializable]
16 | public struct PropertyDisplayName
17 | {
18 | [HideInInspector]
19 | public string propertyName;
20 | public bool hidden;
21 | public string displayName;
22 | }
23 |
24 | public List nameMap = new List();
25 | private Dictionary nameMapIndex = new Dictionary();
26 |
27 | public PropertyDisplayName this[string key] => nameMapIndex[key];
28 |
29 | public bool TryGetValue(string propertyName, out PropertyDisplayName displayName) => nameMapIndex.TryGetValue(propertyName, out displayName);
30 |
31 | public void OnBeforeSerialize()
32 | {
33 |
34 | }
35 |
36 | public void OnAfterDeserialize()
37 | {
38 | foreach (var i in nameMap)
39 | {
40 | nameMapIndex[i.propertyName] = i;
41 | }
42 | }
43 |
44 | private void OnEnable() {
45 | AnalyticsSender.SendEventInEditor(new NameMapEnableEvent(nameMap.Count));
46 | }
47 | }
48 | }
--------------------------------------------------------------------------------
/Runtime/MaterialPropertyNameMap.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: dd2e4dec2f0430540867fe01300dbecd
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/MaterialSwitchClip.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using JetBrains.Annotations;
3 | using UnityEngine;
4 | using UnityEngine.Playables;
5 | using UnityEngine.Serialization;
6 |
7 | namespace Unity.MaterialSwitch
8 | {
9 |
10 | ///
11 | /// A Timeline clip for changing and blending between material parameters.
12 | ///
13 | public class MaterialSwitchClip : PlayableAsset
14 | {
15 |
16 | [FormerlySerializedAs("globalPalettePropertyMap")] [SerializeField] internal MaterialProperties globalMaterialProperties;
17 | [FormerlySerializedAs("palettePropertyMap")] [SerializeField] internal List materialPropertiesList;
18 |
19 | ///
20 | /// Enumerate all material properties set in the clip
21 | ///
22 | ///
23 | internal IEnumerable GetMaterialProperties()
24 | {
25 | foreach (MaterialProperties mp in materialPropertiesList)
26 | yield return mp;
27 | }
28 |
29 | ///
30 | /// Override a property in a certain material.
31 | ///
32 | /// The material which has the property.
33 | /// The name of the property to be overridden
34 | /// The object for overriding.
35 | /// True if the applicable property is found and overridable, false otherwise.
36 | public bool OverrideProperty(Material mat, string propertyName, T obj)
37 | {
38 | MaterialProperties mp = FindMaterialProperties(mat);
39 | if (null == mp)
40 | return false;
41 |
42 | MaterialProperty p = null;
43 | if (typeof(Texture2D) == typeof(T) ) {
44 | p = mp?.FindTextureProperty(propertyName) as MaterialProperty;
45 | } else if (typeof(float) == typeof(T) ) {
46 | p = mp?.FindFloatProperty(propertyName) as MaterialProperty;
47 | } else if (typeof(Color) == typeof(T) ) {
48 | p = mp?.FindColorProperty(propertyName) as MaterialProperty;
49 | }
50 | if (null==p)
51 | return false;
52 |
53 | p.targetValue = obj;
54 | p.overrideBaseValue = true;
55 | return true;
56 | }
57 |
58 | void OnValidate()
59 | {
60 | foreach (var ppm in materialPropertiesList)
61 | {
62 | if (ppm.texture == null) continue;
63 | if(!ppm.texture.isReadable) continue;
64 | for (int i = 0; i < ppm.colorProperties.Count; i++)
65 | {
66 | var cc = ppm.colorProperties[i];
67 | cc.targetValue = ppm.texture.GetPixel((int)cc.uv.x, (int)cc.uv.y);
68 | ppm.colorProperties[i] = cc;
69 | }
70 | }
71 | }
72 |
73 | public override Playable CreatePlayable(PlayableGraph graph, GameObject owner)
74 | {
75 | var playable = ScriptPlayable.Create(graph);
76 | var behaviour = playable.GetBehaviour();
77 | behaviour.clip = this;
78 | behaviour.materialPropertiesList = materialPropertiesList;
79 | return playable;
80 | }
81 |
82 | [CanBeNull]
83 | MaterialProperties FindMaterialProperties(Material mat)
84 | {
85 | foreach (MaterialProperties mp in materialPropertiesList)
86 | {
87 | if (mp.material == mat)
88 | return mp;
89 | }
90 |
91 | return null;
92 | }
93 |
94 | }
95 | }
--------------------------------------------------------------------------------
/Runtime/MaterialSwitchClip.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ad04a3b8c2e8c6a49a60b3d8c8d9ca95
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/MaterialSwitchMixerPlayableBehaviour.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.IO;
3 | using System.Linq;
4 | using UnityEngine;
5 | using UnityEngine.Playables;
6 |
7 | namespace Unity.MaterialSwitch
8 | {
9 | internal class MaterialSwitchMixerPlayableBehaviour : PlayableBehaviour
10 | {
11 | Material textureLerpMaterial;
12 |
13 | HashSet renderers;
14 |
15 | HashSet activePalettePropertyMapInstances= new HashSet();
16 |
17 | private Dictionary materialPropertyBlockManagers =
18 | new Dictionary();
19 |
20 | public override void OnPlayableDestroy(Playable playable)
21 | {
22 | RemoveMaterialPropertyBlocks();
23 | foreach(var ppm in activePalettePropertyMapInstances) {
24 | foreach(var i in ppm.textureProperties) {
25 | if(i.finalTexture != null) {
26 | i.finalTexture.Release();
27 | i.finalTexture = null;
28 | }
29 | }
30 | }
31 | }
32 |
33 | public override void ProcessFrame(Playable playable, FrameData info, object playerData)
34 | {
35 | var group = playerData as SelectionGroups.SelectionGroup;
36 | if (group == null) return;
37 | var materialGroup = group.GetComponent();
38 | if (materialGroup == null) return;
39 | if (Application.isEditor && !Application.isPlaying)
40 | {
41 | materialGroup.CollectMaterials();
42 | renderers = null;
43 | materialPropertyBlockManagers = null;
44 | }
45 |
46 | //a group has many renderers, get them all. This will not change over the duration of the track
47 | if (renderers == null) renderers = new HashSet(group.GetMemberComponents());
48 | if (materialPropertyBlockManagers == null) materialPropertyBlockManagers = new Dictionary();
49 |
50 |
51 |
52 | var inputCount = playable.GetInputCount();
53 |
54 | //get total weight of all playables that are currently being mixed.
55 | var totalWeight = 0f;
56 | for (var i = 0; i < inputCount; i++)
57 | {
58 | var weight = playable.GetInputWeight(i);
59 | totalWeight += weight;
60 | }
61 |
62 | //weights should add up to 1.0, therefore calculate any missing weight using 1 - total.
63 | var missingWeight = 1f - totalWeight;
64 | //there is nothing to do (missing weight = 1 or total weight = 0) remove any property blocks then exit.
65 | if (missingWeight >= 1f)
66 | {
67 | RemoveMaterialPropertyBlocks();
68 | return;
69 | }
70 | CreateMaterialPropertyBlockManagers();
71 | UpdateMaterialPropertyBlockManagers(playable);
72 | ApplyMaterialPropertyBlockManagers();
73 |
74 | }
75 |
76 | private void ApplyMaterialPropertyBlockManagers()
77 | {
78 | foreach (var blockManager in materialPropertyBlockManagers.Values)
79 | {
80 | blockManager.ApplyMaterialPropertyBlockToRenderers();
81 | }
82 | }
83 |
84 | void CreateMaterialPropertyBlockManagers()
85 | {
86 | foreach (var renderer in renderers)
87 | {
88 | for (var index = 0; index < renderer.sharedMaterials.Length; index++)
89 | {
90 | var material = renderer.sharedMaterials[index];
91 | if (!materialPropertyBlockManagers.TryGetValue(material, out var bm))
92 | {
93 | bm = materialPropertyBlockManagers[material] = new MaterialPropertyBlockManager();
94 | }
95 | bm.material = material;
96 | bm.AddRenderer(renderer, index);
97 | }
98 | }
99 | }
100 |
101 | private void UpdateMaterialPropertyBlockManagers(Playable playable)
102 | {
103 | var inputCount = playable.GetInputCount();
104 | for (var i = 0; i < inputCount; i++)
105 | {
106 | var weight = playable.GetInputWeight(i);
107 | if (weight == 0) continue;
108 |
109 | var behaviour = ((ScriptPlayable) playable.GetInput(i)).GetBehaviour();
110 |
111 | foreach (var pm in behaviour.materialPropertiesList)
112 | {
113 | if (materialPropertyBlockManagers.TryGetValue(pm.material, out var bm))
114 | {
115 | bm.BlendPalettePropertyMap(weight, behaviour.clip.globalMaterialProperties, pm);
116 | }
117 | }
118 | }
119 | }
120 |
121 | void RemoveMaterialPropertyBlocks()
122 | {
123 | if (renderers != null)
124 | foreach (var r in renderers)
125 | {
126 | if (r == null) continue;
127 | for (var i = 0; i < r.sharedMaterials.Length; i++)
128 | {
129 | r.SetPropertyBlock(null, i);
130 | }
131 | }
132 | }
133 | }
134 | }
--------------------------------------------------------------------------------
/Runtime/MaterialSwitchMixerPlayableBehaviour.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a0e96e74a14848c47aea7eb74c99c1b0
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/MaterialSwitchPlayableBehaviour.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using UnityEngine;
4 | using UnityEngine.Playables;
5 |
6 | namespace Unity.MaterialSwitch
7 | {
8 | internal class MaterialSwitchPlayableBehaviour : PlayableBehaviour
9 | {
10 | public List materialPropertiesList;
11 | public MaterialSwitchClip clip;
12 |
13 | // This magic method is only available in the editor.
14 | internal static System.Func CreateMaterialProperties;
15 |
16 |
17 | }
18 | }
--------------------------------------------------------------------------------
/Runtime/MaterialSwitchPlayableBehaviour.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 95f93e322b80a774f81767601899aaec
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/MaterialSwitchProperties.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UnityEngine;
3 |
4 | namespace Unity.MaterialSwitch
5 | {
6 | ///
7 | /// A non-generic base class for overriding material property in MaterialSwitchClip
8 | ///
9 | [Serializable]
10 | internal abstract class MaterialSwitchProperty
11 | {
12 | //[SerializeField] internal string displayName;
13 | [SerializeField] internal string propertyName;
14 | [SerializeField] internal int propertyId;
15 | [SerializeField] internal bool overrideBaseValue = false;
16 |
17 | ///
18 | /// Check if the property is overridden
19 | ///
20 | /// true if overridden, false otherwise.
21 | public bool IsOverridden() => overrideBaseValue;
22 |
23 | ///
24 | /// The name of the property
25 | ///
26 | /// The property name
27 | public string GetPropertyName() => propertyName;
28 |
29 | }
30 |
31 | ///
32 | /// A generic base class for overriding material property in MaterialSwitchClip
33 | ///
34 | [Serializable]
35 | internal abstract class MaterialProperty : MaterialSwitchProperty
36 | {
37 | [SerializeField] internal T baseValue;
38 | [SerializeField] internal T targetValue;
39 |
40 | ///
41 | /// Get the value to be used for overriding a property.
42 | ///
43 | /// The value for overriding a property.
44 | public T GetTargetValue() => targetValue;
45 | }
46 |
47 | ///
48 | /// A class for overriding a float property in MaterialSwitchClip
49 | ///
50 | [System.Serializable]
51 | internal class FloatProperty : MaterialProperty
52 | {
53 |
54 | }
55 |
56 | ///
57 | /// A class for overriding a range property in MaterialSwitchClip
58 | ///
59 | [System.Serializable]
60 | internal class RangeProperty : FloatProperty
61 | {
62 | [SerializeField] internal Vector2 rangeLimits;
63 | }
64 |
65 | ///
66 | /// A class for overriding a vector property in MaterialSwitchClip
67 | ///
68 | [System.Serializable]
69 | internal class VectorProperty : MaterialProperty
70 | {
71 |
72 | }
73 |
74 | ///
75 | /// A class for overriding texture property in MaterialSwitchClip
76 | ///
77 | [System.Serializable]
78 | internal class TextureProperty : MaterialProperty
79 | {
80 | [SerializeField] internal RenderTexture finalTexture;
81 | }
82 |
83 | ///
84 | /// A class for overriding color property in MaterialSwitchClip
85 | ///
86 | [System.Serializable]
87 | internal class ColorProperty : MaterialProperty
88 | {
89 | [SerializeField] internal Vector2 uv;
90 | }
91 |
92 |
93 | }
--------------------------------------------------------------------------------
/Runtime/MaterialSwitchProperties.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a910f5c60d9e4d649b2a3ae877920273
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/MaterialSwitchTrack.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Unity.FilmInternalUtilities;
3 | using Unity.SelectionGroups;
4 | using UnityEngine.Playables;
5 | using UnityEngine.Timeline;
6 |
7 | namespace Unity.MaterialSwitch
8 | {
9 | ///
10 | /// Tracks for changing and blending between material parameters.
11 | ///
12 | [TrackClipType(typeof(MaterialSwitchClip))]
13 | [TrackBindingType(typeof(SelectionGroup))]
14 | internal class MaterialSwitchTrack : TrackAsset
15 | {
16 |
17 | public override Playable CreateTrackMixer(UnityEngine.Playables.PlayableGraph graph, UnityEngine.GameObject go, int inputCount)
18 | {
19 |
20 | #if UNITY_EDITOR
21 | List clips = new List(GetClips());
22 | int numMaterials = 0;
23 |
24 | PlayableDirector director = go.GetComponent();
25 | SelectionGroup sg = director.GetGenericBinding(this) as SelectionGroup;
26 | if (null != sg) {
27 | MaterialGroup mg = sg.gameObject.GetComponent();
28 | if (null != mg) {
29 | numMaterials = mg.sharedMaterials.Length;
30 | }
31 | }
32 | AnalyticsSender.SendEventInEditor(new MaterialSwitchTrackMixerEvent(clips.Count, numMaterials));
33 |
34 | #endif
35 |
36 | return ScriptPlayable.Create(graph, inputCount);
37 | }
38 | }
39 | }
--------------------------------------------------------------------------------
/Runtime/MaterialSwitchTrack.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5697b525ea6e42b48ab7ea06c9dfe665
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Scripts.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3c1aeb51c43e2426e8c3b6a538144975
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Scripts/Analytics.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a1e3c851954e94268a92b6094d70f044
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Scripts/Analytics/MaterialSwitchTrackMixerEvent.cs:
--------------------------------------------------------------------------------
1 | using Unity.FilmInternalUtilities;
2 |
3 | namespace Unity.MaterialSwitch {
4 |
5 | internal class MaterialSwitchTrackMixerEvent : AnalyticsEvent {
6 |
7 | internal MaterialSwitchTrackMixerEvent(int clips, int materials) : base(new EventData { numClips = clips, numMaterials = materials}) { }
8 |
9 | private class EventData : AnalyticsEventData {
10 | public int numClips;
11 | public int numMaterials;
12 | }
13 |
14 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------
15 |
16 | internal override string eventName => "materialswitch_materialswitchtrack_mixer";
17 | internal override int maxItems => 1;
18 |
19 |
20 | }
21 |
22 | } //end namespace
--------------------------------------------------------------------------------
/Runtime/Scripts/Analytics/MaterialSwitchTrackMixerEvent.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3ed1d3ac556e94314898cf75b7de3688
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Scripts/Analytics/NameMapEnableEvent.cs:
--------------------------------------------------------------------------------
1 | using Unity.FilmInternalUtilities;
2 |
3 | namespace Unity.MaterialSwitch {
4 |
5 | internal class NameMapEnableEvent : AnalyticsEvent {
6 |
7 | internal NameMapEnableEvent(int mappedProperties) : base(
8 | new EventData {
9 | numMappedProperties = mappedProperties,
10 | })
11 | { }
12 |
13 | private class EventData : AnalyticsEventData {
14 | public double numMappedProperties;
15 | }
16 |
17 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------
18 |
19 | internal override string eventName => "materialswitch_namemap_enable";
20 | internal override int maxItems => 1;
21 |
22 | }
23 |
24 | } //end namespace
--------------------------------------------------------------------------------
/Runtime/Scripts/Analytics/NameMapEnableEvent.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7405856224d1f4db1b3aa66a3998bc76
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Scripts/Analytics/SpriteSwitchTrackMixerEvent.cs:
--------------------------------------------------------------------------------
1 | using Unity.FilmInternalUtilities;
2 |
3 | namespace Unity.MaterialSwitch {
4 |
5 | internal class SpriteSwitchTrackMixerEvent : AnalyticsEvent {
6 |
7 | internal SpriteSwitchTrackMixerEvent(int clips) : base(new EventData { numClips = clips, }) { }
8 |
9 | private class EventData : AnalyticsEventData {
10 | public int numClips;
11 | }
12 |
13 | //--------------------------------------------------------------------------------------------------------------------------------------------------------------
14 |
15 | internal override string eventName => "materialswitch_spriteswitchtrack_mixer";
16 | internal override int maxItems => 1;
17 |
18 |
19 | }
20 |
21 | } //end namespace
--------------------------------------------------------------------------------
/Runtime/Scripts/Analytics/SpriteSwitchTrackMixerEvent.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: cdb65a39f446744a3883cd5ab3ed9f85
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/SelectionGroupExtensions.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using UnityEngine;
4 |
5 | namespace Unity.MaterialSwitch
6 | {
7 | internal static class SelectionGroupExtensions
8 | {
9 | public static Material[] GetMaterials(this SelectionGroups.SelectionGroup group)
10 | {
11 | var materials = new HashSet();
12 | foreach (var i in group.GetMemberComponents())
13 | {
14 | materials.UnionWith(i.sharedMaterials);
15 | }
16 | return materials.ToArray();
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/Runtime/SelectionGroupExtensions.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ebaee1cb618753242b92aeee161d8e2c
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/SpriteGroup.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using UnityEditor;
4 | using UnityEngine;
5 | using UnityEngine.Serialization;
6 |
7 | namespace Unity.MaterialSwitch
8 | {
9 | [AddComponentMenu("")]
10 | [ExecuteAlways]
11 | [RequireComponent(typeof(SelectionGroups.SelectionGroup))]
12 | internal class SpriteGroup : MonoBehaviour
13 | {
14 | [HideInInspector] [SerializeField] internal SpriteRenderer[] spriteRenderers;
15 |
16 |
17 | void OnEnable()
18 | {
19 | CollectSpriteRenderers();
20 | #if UNITY_EDITOR
21 | EditorApplication.hierarchyChanged -= CollectSpriteRenderers;
22 | EditorApplication.hierarchyChanged += CollectSpriteRenderers;
23 | #endif
24 | }
25 |
26 | void OnDisable()
27 | {
28 | #if UNITY_EDITOR
29 | EditorApplication.hierarchyChanged -= CollectSpriteRenderers;
30 | #endif
31 | }
32 |
33 | public void CollectSpriteRenderers()
34 | {
35 | var group = GetComponent();
36 | spriteRenderers = group.GetMemberComponents().ToArray();
37 | }
38 | }
39 | }
--------------------------------------------------------------------------------
/Runtime/SpriteGroup.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1c0176b53a3341b884851d582fdaca5f
3 | timeCreated: 1674530659
--------------------------------------------------------------------------------
/Runtime/SpriteSwitchClip.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using UnityEngine.Playables;
3 | using UnityEngine.Serialization;
4 | using UnityEngine.Timeline;
5 |
6 | namespace Unity.MaterialSwitch
7 | {
8 | internal class SpriteSwitchClip : PlayableAsset, ITimelineClipAsset
9 | {
10 | public Texture2D spriteSheet;
11 |
12 | public ClipCaps clipCaps => ClipCaps.None;
13 |
14 | public override Playable CreatePlayable(PlayableGraph graph, GameObject owner)
15 | {
16 | var playable = ScriptPlayable.Create(graph);
17 | var behaviour = playable.GetBehaviour();
18 | behaviour.clip = this;
19 | return playable;
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/Runtime/SpriteSwitchClip.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b902b0b15593424aa540f7c4f69efcd3
3 | timeCreated: 1674530105
--------------------------------------------------------------------------------
/Runtime/SpriteSwitchEventInvoker.cs:
--------------------------------------------------------------------------------
1 | //[Note-sin: 2023-03-29] Comment this for debugging in the editor
2 | //#define DEBUG_SPRITE_SWITCH
3 |
4 |
5 | using System;
6 | using System.Collections.Generic;
7 | using Unity.FilmInternalUtilities;
8 | using UnityEngine;
9 |
10 | namespace Unity.MaterialSwitch
11 | {
12 | [AddComponentMenu("")]
13 | [ExecuteAlways]
14 | internal class SpriteSwitchEventInvoker : MonoBehaviourSingleton
15 | {
16 |
17 | private List actions = new List();
18 |
19 | public static void OnLateUpdate(System.Action action)
20 | {
21 | GetOrCreateInstance().actions.Add(action);
22 | }
23 |
24 | void OnEnable() {
25 | SetHideFlags(gameObject);
26 | }
27 |
28 | void LateUpdate()
29 | {
30 | foreach (var i in actions)
31 | {
32 | i.Invoke();
33 | }
34 | actions.Clear();
35 | }
36 |
37 | private static void SetHideFlags(GameObject go) {
38 | #if DEBUG_SPRITE_SWITCH
39 | go.hideFlags = HideFlags.None;
40 | #else
41 | go.hideFlags = HideFlags.HideInHierarchy;
42 | #endif
43 | }
44 | }
45 | }
--------------------------------------------------------------------------------
/Runtime/SpriteSwitchEventInvoker.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 14ecfbc5e8dd480b85f8ee02c3ce3624
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/SpriteSwitchMixerBehaviour.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using UnityEngine;
3 | using UnityEngine.Playables;
4 |
5 | namespace Unity.MaterialSwitch
6 | {
7 | internal class SpriteSwitchMixerPlayableBehaviour : PlayableBehaviour
8 | {
9 | private Dictionary _propertyBlocks = new Dictionary();
10 | private static readonly int MainTex = Shader.PropertyToID("_MainTex");
11 |
12 | public override void ProcessFrame(Playable playable, FrameData info, object playerData)
13 | {
14 | var group = playerData as SelectionGroups.SelectionGroup;
15 | if (group == null) return;
16 | if (!group.TryGetComponent(out SpriteGroup spriteGroup))
17 | {
18 | spriteGroup = group.gameObject.AddComponent();
19 | }
20 |
21 | // This code is disabled until we are sure it is not required.
22 | // if (Application.isEditor && !Application.isPlaying)
23 | // {
24 | // spriteGroup.CollectSpriteRenderers();
25 | // }
26 |
27 | var inputCount = playable.GetInputCount();
28 |
29 | for (var i = 0; i < inputCount; i++)
30 | {
31 | var weight = playable.GetInputWeight(i);
32 | // the first input on the track with a weight greater than 0 will be the only clip processed, as we do not mix clips.
33 | if (weight > 0)
34 | {
35 | var behaviour = ((ScriptPlayable) playable.GetInput(i)).GetBehaviour();
36 | for (var j = 0; j < spriteGroup.spriteRenderers.Length; j++)
37 | {
38 | var spriteRenderer = spriteGroup.spriteRenderers[j];
39 | SetSpriteSheet(spriteRenderer, behaviour.clip.spriteSheet);
40 | }
41 | return;
42 | }
43 | }
44 |
45 | for (var j = 0; j < spriteGroup.spriteRenderers.Length; j++)
46 | {
47 | var spriteRenderer = spriteGroup.spriteRenderers[j];
48 | SetSpriteSheet(spriteRenderer, spriteRenderer.sprite.texture);
49 | }
50 | }
51 |
52 | private void SetSpriteSheet(SpriteRenderer spriteRenderer, Texture2D spriteSheet)
53 | {
54 | // This is required to override the animator controller which will also set the
55 | // property block on this sprite renderer.
56 | SpriteSwitchEventInvoker.OnLateUpdate(() =>
57 | {
58 | if (spriteSheet == null)
59 | {
60 | spriteRenderer.SetPropertyBlock(null);
61 | return;
62 | }
63 |
64 | if (!_propertyBlocks.TryGetValue(spriteRenderer, out var propertyBlock))
65 | propertyBlock = new MaterialPropertyBlock();
66 |
67 | spriteRenderer.GetPropertyBlock(propertyBlock);
68 | _propertyBlocks[spriteRenderer] = propertyBlock;
69 | propertyBlock.SetTexture(MainTex, spriteSheet);
70 | spriteRenderer.SetPropertyBlock(propertyBlock);
71 | });
72 | }
73 | }
74 | }
--------------------------------------------------------------------------------
/Runtime/SpriteSwitchMixerBehaviour.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4e2b8c3280514dd596cc3e3bf5367a56
3 | timeCreated: 1674530236
--------------------------------------------------------------------------------
/Runtime/SpriteSwitchPlayableBehaviour.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine.Playables;
2 |
3 | namespace Unity.MaterialSwitch
4 | {
5 | internal class SpriteSwitchPlayableBehaviour : PlayableBehaviour
6 | {
7 | public SpriteSwitchClip clip;
8 | }
9 | }
--------------------------------------------------------------------------------
/Runtime/SpriteSwitchPlayableBehaviour.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a7f4dcbc22db41ed9fd48b5683b06c95
3 | timeCreated: 1674530095
--------------------------------------------------------------------------------
/Runtime/SpriteSwitchTrack.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Unity.FilmInternalUtilities;
3 | using Unity.SelectionGroups;
4 | using UnityEngine.Playables;
5 | using UnityEngine.Timeline;
6 |
7 | namespace Unity.MaterialSwitch
8 | {
9 | ///
10 | /// Tracks for changing between sprites parameters.
11 | ///
12 | [TrackClipType(typeof(SpriteSwitchClip))]
13 | [TrackBindingType(typeof(SelectionGroup))]
14 | internal class SpriteSwitchTrack : TrackAsset
15 | {
16 |
17 | public override Playable CreateTrackMixer(UnityEngine.Playables.PlayableGraph graph, UnityEngine.GameObject go, int inputCount)
18 | {
19 | #if UNITY_EDITOR
20 | List clips = new List(GetClips());
21 | AnalyticsSender.SendEventInEditor(new SpriteSwitchTrackMixerEvent(clips.Count));
22 | #endif
23 | return ScriptPlayable.Create(graph, inputCount);
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/Runtime/SpriteSwitchTrack.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c9fd7804306442aebf23fa5c66e2ca23
3 | timeCreated: 1674530309
--------------------------------------------------------------------------------
/Runtime/Unity.MaterialSwitch.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Unity.MaterialSwitch",
3 | "rootNamespace": "",
4 | "references": [
5 | "GUID:f06555f75b070af458a003d92f9efb00",
6 | "GUID:a1f2a1ae20746f947b43a9e2da5b01fc",
7 | "GUID:405bbed08ae367a47a5c7f18bf3b6328"
8 | ],
9 | "includePlatforms": [],
10 | "excludePlatforms": [],
11 | "allowUnsafeCode": false,
12 | "overrideReferences": false,
13 | "precompiledReferences": [],
14 | "autoReferenced": true,
15 | "defineConstraints": [],
16 | "versionDefines": [],
17 | "noEngineReferences": false
18 | }
--------------------------------------------------------------------------------
/Runtime/Unity.MaterialSwitch.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ca4be1156066ae94a893e0236f6a75d6
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Scripts~/sync_package_info.sh:
--------------------------------------------------------------------------------
1 | packageName="com.unity.material-switch"
2 |
3 | cp package.json "MaterialSwitch~/Packages/${packageName}"
4 | cp CHANGELOG.md "MaterialSwitch~/Packages/${packageName}"
5 |
6 |
--------------------------------------------------------------------------------
/Shaders.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f19b1244d3160f343a9f16d4c4ee9048
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Shaders/TextureLerp.shader:
--------------------------------------------------------------------------------
1 | Shader "Hidden/TextureLerp"
2 | {
3 | Properties
4 | {
5 | _MainTex ("Texture", 2D) = "black" {}
6 | _TargetTex ("Target Texture", 2D) = "white" {}
7 | _Weight ("Weight", float) = 0.5
8 | }
9 | SubShader
10 | {
11 | // No culling or depth
12 | Cull Off ZWrite Off ZTest Always
13 |
14 | Pass
15 | {
16 | CGPROGRAM
17 | #pragma vertex vert
18 | #pragma fragment frag
19 |
20 | #include "UnityCG.cginc"
21 |
22 | struct appdata
23 | {
24 | float4 vertex : POSITION;
25 | float2 uv : TEXCOORD0;
26 | };
27 |
28 | struct v2f
29 | {
30 | float2 uv : TEXCOORD0;
31 | float4 vertex : SV_POSITION;
32 | };
33 |
34 | v2f vert (appdata v)
35 | {
36 | v2f o;
37 | o.vertex = UnityObjectToClipPos(v.vertex);
38 | o.uv = v.uv;
39 | return o;
40 | }
41 |
42 | sampler2D _MainTex;
43 | sampler2D _TargetTex;
44 |
45 | float _Weight;
46 |
47 | fixed4 frag (v2f i) : SV_Target
48 | {
49 | fixed4 colA = tex2D(_MainTex, i.uv);
50 | fixed4 colB = tex2D(_TargetTex, i.uv);
51 | return lerp(colA, colB, _Weight);
52 | }
53 | ENDCG
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/Shaders/TextureLerp.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 94b0a52ba3916574da49549ddf05b45f
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Tests.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 18599033eef855c4ca32efa05cd26026
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Tests/Editor.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 788e7b06e33b14c46ba8dc9edbddc529
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Tests/Editor/MaterialSwitchClipTests.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f9657899669a3c44f86420748f2b1645
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Tests/Editor/MaterialSwitchTestEditorConstants.cs:
--------------------------------------------------------------------------------
1 | namespace Unity.MaterialSwitch.EditorTests {
2 |
3 | internal static class MaterialSwitchTestEditorConstants {
4 |
5 | internal const string TEST_TIMELINE_ASSET_PATH = "Assets/TempMaterialSwitchTimelineForTestRunner.playable";
6 |
7 | }
8 |
9 | } //end namespace
--------------------------------------------------------------------------------
/Tests/Editor/MaterialSwitchTestEditorConstants.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 974ef9f9b71d8704faed8e91663cbbf5
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Tests/Editor/MaterialSwitchTestEditorUtility.cs:
--------------------------------------------------------------------------------
1 | using Unity.FilmInternalUtilities.Editor;
2 | using Unity.SelectionGroups;
3 | using UnityEngine;
4 | using UnityEngine.Playables;
5 | using UnityEngine.Timeline;
6 | using Assert = UnityEngine.Assertions.Assert;
7 |
8 | namespace Unity.MaterialSwitch.EditorTests
9 | {
10 | internal static class MaterialSwitchEditorTestUtility
11 | {
12 | internal static PlayableDirector CreateDirectorWithTimelineAsset(out TimelineAsset timelineAsset) {
13 | timelineAsset = ScriptableObject.CreateInstance();
14 | PlayableDirector director = new GameObject("Director").AddComponent();
15 | Assert.IsNotNull(timelineAsset);
16 |
17 | director.playableAsset = timelineAsset;
18 | return director;
19 | }
20 |
21 |
22 | internal static PlayableDirector CreateDefaultDirectorAndTrack(out TimelineAsset timelineAsset,
23 | out MaterialSwitchTrack track, out SelectionGroup group)
24 | {
25 | PlayableDirector director = MaterialSwitchEditorTestUtility.CreateDirectorWithTimelineAsset(
26 | out timelineAsset
27 | );
28 | TimelineEditorUtility.SelectDirectorInTimelineWindow(director);
29 | track = timelineAsset.CreateTrack(null, "TestTrack");
30 |
31 | group = SelectionGroupManager.GetOrCreateInstance().CreateSelectionGroup("New Group", Color.green);
32 | director.SetGenericBinding(track, group);
33 | return director;
34 | }
35 |
36 |
37 | }
38 |
39 | } //end namespace
--------------------------------------------------------------------------------
/Tests/Editor/MaterialSwitchTestEditorUtility.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2a36f3a75d434c74592bd3ffef0f4b0e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Tests/Editor/MaterialSwitchTrackTests.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using NUnit.Framework;
3 | using Unity.FilmInternalUtilities.Editor;
4 | using Unity.SelectionGroups;
5 | using UnityEngine;
6 | using UnityEngine.Playables;
7 | using UnityEngine.TestTools;
8 | using UnityEngine.Timeline;
9 | using Assert = UnityEngine.Assertions.Assert;
10 |
11 | namespace Unity.MaterialSwitch.EditorTests
12 | {
13 | internal class MaterialSwitchTrackTests
14 | {
15 | //----------------------------------------------------------------------------------------------------------------------
16 |
17 | [UnityTest]
18 | public IEnumerator CreateEmptyPlayableAsset() {
19 |
20 | PlayableDirector director = MaterialSwitchEditorTestUtility.CreateDirectorWithTimelineAsset(
21 | out TimelineAsset timelineAsset
22 | );
23 |
24 | yield return YieldEditorUtility.WaitForFramesAndIncrementUndo(3);
25 | TimelineEditorUtility.CreateTrackAndClip(timelineAsset, "TestTrack");
26 | yield return YieldEditorUtility.WaitForFramesAndIncrementUndo(3);
27 |
28 | }
29 |
30 | //----------------------------------------------------------------------------------------------------------------------
31 | //[TODO-sin: 2021-11-10] Include this test as well
32 | [Ignore("CreateClip")]
33 | [UnityTest]
34 | public IEnumerator CreateClip() {
35 | TimelineAsset timelineAsset = TimelineEditorUtility.CreateAsset(MaterialSwitchTestEditorConstants.TEST_TIMELINE_ASSET_PATH);
36 | yield return YieldEditorUtility.WaitForFramesAndIncrementUndo(3);
37 |
38 | TimelineClip clip = TimelineEditorUtility.CreateTrackAndClip(timelineAsset, "TestTrack",
39 | typeof(MaterialSwitchTrack), typeof(MaterialSwitchClip));
40 |
41 | yield return YieldEditorUtility.WaitForFramesAndIncrementUndo(3);
42 |
43 | TimelineEditorUtility.DestroyAssets(clip);
44 | }
45 |
46 | //----------------------------------------------------------------------------------------------------------------------
47 | [UnityTest]
48 | public IEnumerator AssignSelectionGroupToTrack() {
49 |
50 | PlayableDirector director = MaterialSwitchEditorTestUtility.CreateDefaultDirectorAndTrack(
51 | out TimelineAsset _, out MaterialSwitchTrack _, out SelectionGroup _
52 | );
53 | TimelineEditorUtility.SelectDirectorInTimelineWindow(director);
54 | yield return YieldEditorUtility.WaitForFramesAndIncrementUndo(3);
55 | }
56 |
57 | }
58 |
59 | } //end namespace
60 |
--------------------------------------------------------------------------------
/Tests/Editor/MaterialSwitchTrackTests.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2ccd80c931f04fe4aa6fffd6ee392eaf
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Tests/Editor/Unity.MaterialSwitch.EditorTests.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Unity.MaterialSwitch.EditorTests",
3 | "rootNamespace": "",
4 | "references": [
5 | "UnityEngine.TestRunner",
6 | "UnityEditor.TestRunner",
7 | "Unity.Timeline",
8 | "Unity.Timeline.Editor",
9 | "Unity.FilmInternalUtilities",
10 | "Unity.FilmInternalUtilities.Editor",
11 | "Unity.MaterialSwitch",
12 | "Unity.MaterialSwitch.Editor",
13 | "Unity.SelectionGroups",
14 | "Unity.SelectionGroups.Editor"
15 | ],
16 | "includePlatforms": [
17 | "Editor"
18 | ],
19 | "excludePlatforms": [],
20 | "allowUnsafeCode": false,
21 | "overrideReferences": true,
22 | "precompiledReferences": [
23 | "nunit.framework.dll"
24 | ],
25 | "autoReferenced": false,
26 | "defineConstraints": [
27 | "UNITY_INCLUDE_TESTS"
28 | ],
29 | "versionDefines": [],
30 | "noEngineReferences": false
31 | }
--------------------------------------------------------------------------------
/Tests/Editor/Unity.MaterialSwitch.EditorTests.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6d30be35c98f9d349b9bb208137ad23d
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Tests/Runtime.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ead264b0bf3f70546818c5fa65285e5b
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Tests/Runtime/RuntimeTests.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using NUnit.Framework;
4 | using UnityEngine;
5 | using UnityEngine.TestTools;
6 |
7 | namespace Unity.SelectionGroups.Tests {
8 | public class RuntimeTests
9 | {
10 | // A Test behaves as an ordinary method
11 | [Test]
12 | public void RuntimeTestsSimplePasses()
13 | {
14 | // Use the Assert class to test conditions
15 | }
16 |
17 | // A UnityTest behaves like a coroutine in Play Mode. In Edit Mode you can use
18 | // `yield return null;` to skip a frame.
19 | [UnityTest]
20 | public IEnumerator RuntimeTestsWithEnumeratorPasses()
21 | {
22 | // Use the Assert class to test conditions.
23 | // Use yield to skip a frame.
24 | yield return null;
25 | }
26 | }
27 |
28 | } //end namespace
29 |
30 |
--------------------------------------------------------------------------------
/Tests/Runtime/RuntimeTests.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 72e569217faf56646858f2d33c8b2c91
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Tests/Runtime/Unity.MaterialSwitch.Tests.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Unity.MaterialSwitch.Tests",
3 | "references": [
4 | "UnityEngine.TestRunner",
5 | "UnityEditor.TestRunner"
6 | ],
7 | "includePlatforms": [],
8 | "excludePlatforms": [],
9 | "allowUnsafeCode": false,
10 | "overrideReferences": true,
11 | "precompiledReferences": [
12 | "nunit.framework.dll"
13 | ],
14 | "autoReferenced": false,
15 | "defineConstraints": [
16 | "UNITY_INCLUDE_TESTS"
17 | ],
18 | "versionDefines": [],
19 | "noEngineReferences": false
20 | }
--------------------------------------------------------------------------------
/Tests/Runtime/Unity.MaterialSwitch.Tests.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 31f723816b3203647a95a89be846d4ab
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "displayName": "Material Switch",
3 | "name": "com.unity.material-switch",
4 | "unity": "2021.3",
5 | "version": "0.10.0-preview",
6 | "description": "Provides tools for switching and blending material parameters over a number of renderers simultaneously using Timeline.",
7 | "contributors": [
8 | "Simon Wittber (https://github.com/smnwttbr)",
9 | "Sindharta Tanuwijaya (https://github.com/sindharta)",
10 | "Unity Technologies Japan"
11 | ],
12 | "dependencies": {
13 | "com.unity.film-internal-utilities": "0.18.4-preview",
14 | "com.unity.selection-groups": "0.8.0-preview",
15 | "com.unity.timeline": "1.5.7"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/package.json.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 705f146f2c5e65f4f9587e3da4537f76
3 | PackageManifestImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------