mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-14 19:11:36 +08:00
[unity] Improved error message when SkeletonDataAsset has 0 atlas and HiddenPass shader not included. Closes #2544. Also fixed quiet param unused at GetSkeletonData call.
This commit is contained in:
parent
568e5ef049
commit
e622c6b5dd
@ -38,11 +38,17 @@ namespace Spine.Unity {
|
||||
static AtlasRegion EmptyRegion {
|
||||
get {
|
||||
if (emptyRegion == null) {
|
||||
Shader hiddenShader = Shader.Find("Spine/Special/HiddenPass");
|
||||
if (hiddenShader == null) {
|
||||
Debug.LogError("Shader \"Spine/Special/HiddenPass\" not found while loading SkeletonDataAsset" +
|
||||
" with 0 Atlas Assets. Please add this shader to Project Settings - Graphics - Always" +
|
||||
" Included Shaders, or make sure your SkeletonDataAssets all have an AtlasAsset assigned.");
|
||||
}
|
||||
emptyRegion = new AtlasRegion {
|
||||
name = "Empty AtlasRegion",
|
||||
page = new AtlasPage {
|
||||
name = "Empty AtlasPage",
|
||||
rendererObject = new Material(Shader.Find("Spine/Special/HiddenPass")) { name = "NoRender Material" }
|
||||
rendererObject = new Material(hiddenShader) { name = "NoRender Material" }
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@ -473,7 +473,7 @@ namespace Spine.Unity {
|
||||
if (skeletonDataAsset == null)
|
||||
return;
|
||||
|
||||
SkeletonData skeletonData = skeletonDataAsset.GetSkeletonData(false);
|
||||
SkeletonData skeletonData = skeletonDataAsset.GetSkeletonData(quiet);
|
||||
if (skeletonData == null) return;
|
||||
valid = true;
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "com.esotericsoftware.spine.spine-unity",
|
||||
"displayName": "spine-unity Runtime",
|
||||
"description": "This plugin provides the spine-unity runtime core.",
|
||||
"version": "4.2.68",
|
||||
"version": "4.2.69",
|
||||
"unity": "2018.3",
|
||||
"author": {
|
||||
"name": "Esoteric Software",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user