mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-02 05:39:07 +08:00
[unity] Changed BoneFollower methods LateUpdate and Initialize to virtual.
This commit is contained in:
parent
74487f65a0
commit
7e34a31fa1
@ -37,6 +37,7 @@
|
|||||||
|
|
||||||
* **Breaking changes**
|
* **Breaking changes**
|
||||||
* Changed `SpineShaderWithOutlineGUI` outline related methods from `private` to `protected virtual` to allow for custom shader GUI subclasses to switch to different outline shaders.
|
* Changed `SpineShaderWithOutlineGUI` outline related methods from `private` to `protected virtual` to allow for custom shader GUI subclasses to switch to different outline shaders.
|
||||||
|
* Changed `BoneFollower` and `BoneFollowerGraphic` methods `LateUpdate` and `Initialize` to `virtual` to allow easier overriding for e.g. positional offset in custom subclasses.
|
||||||
|
|
||||||
* **Changes of default values**
|
* **Changes of default values**
|
||||||
|
|
||||||
|
|||||||
@ -113,7 +113,7 @@ namespace Spine.Unity {
|
|||||||
Initialize();
|
Initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Initialize () {
|
public virtual void Initialize () {
|
||||||
bone = null;
|
bone = null;
|
||||||
valid = skeletonRenderer != null && skeletonRenderer.valid;
|
valid = skeletonRenderer != null && skeletonRenderer.valid;
|
||||||
if (!valid) return;
|
if (!valid) return;
|
||||||
@ -137,7 +137,7 @@ namespace Spine.Unity {
|
|||||||
skeletonRenderer.OnRebuild -= HandleRebuildRenderer;
|
skeletonRenderer.OnRebuild -= HandleRebuildRenderer;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LateUpdate () {
|
public virtual void LateUpdate () {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
Initialize();
|
Initialize();
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -99,7 +99,7 @@ namespace Spine.Unity {
|
|||||||
if (initializeOnAwake) Initialize();
|
if (initializeOnAwake) Initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Initialize () {
|
public virtual void Initialize () {
|
||||||
bone = null;
|
bone = null;
|
||||||
valid = skeletonGraphic != null && skeletonGraphic.IsValid;
|
valid = skeletonGraphic != null && skeletonGraphic.IsValid;
|
||||||
if (!valid) return;
|
if (!valid) return;
|
||||||
@ -119,7 +119,7 @@ namespace Spine.Unity {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LateUpdate () {
|
public virtual void LateUpdate () {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
Initialize();
|
Initialize();
|
||||||
return;
|
return;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user