mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-25 22:23:42 +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 {
|
static AtlasRegion EmptyRegion {
|
||||||
get {
|
get {
|
||||||
if (emptyRegion == null) {
|
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 {
|
emptyRegion = new AtlasRegion {
|
||||||
name = "Empty AtlasRegion",
|
name = "Empty AtlasRegion",
|
||||||
page = new AtlasPage {
|
page = new AtlasPage {
|
||||||
name = "Empty 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)
|
if (skeletonDataAsset == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
SkeletonData skeletonData = skeletonDataAsset.GetSkeletonData(false);
|
SkeletonData skeletonData = skeletonDataAsset.GetSkeletonData(quiet);
|
||||||
if (skeletonData == null) return;
|
if (skeletonData == null) return;
|
||||||
valid = true;
|
valid = true;
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
"name": "com.esotericsoftware.spine.spine-unity",
|
"name": "com.esotericsoftware.spine.spine-unity",
|
||||||
"displayName": "spine-unity Runtime",
|
"displayName": "spine-unity Runtime",
|
||||||
"description": "This plugin provides the spine-unity runtime core.",
|
"description": "This plugin provides the spine-unity runtime core.",
|
||||||
"version": "4.2.68",
|
"version": "4.2.69",
|
||||||
"unity": "2018.3",
|
"unity": "2018.3",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Esoteric Software",
|
"name": "Esoteric Software",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user