fix Shader.PropertyToID error on Unity 5.x #26
This commit is contained in:
@@ -240,6 +240,13 @@ public class Texture : MonoBehaviour
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int clipPositionScaleKey_;
|
||||||
|
|
||||||
|
void Awake()
|
||||||
|
{
|
||||||
|
clipPositionScaleKey_ = Shader.PropertyToID("_ClipPositionScale");
|
||||||
|
}
|
||||||
|
|
||||||
void OnEnable()
|
void OnEnable()
|
||||||
{
|
{
|
||||||
if (monitor == null) {
|
if (monitor == null) {
|
||||||
@@ -271,8 +278,7 @@ public class Texture : MonoBehaviour
|
|||||||
|
|
||||||
void RequireUpdate()
|
void RequireUpdate()
|
||||||
{
|
{
|
||||||
if (monitor != null)
|
if (monitor != null) {
|
||||||
{
|
|
||||||
monitor.shouldBeUpdated = true;
|
monitor.shouldBeUpdated = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -283,7 +289,6 @@ public class Texture : MonoBehaviour
|
|||||||
monitor = Manager.GetMonitor(lastMonitorId_);
|
monitor = Manager.GetMonitor(lastMonitorId_);
|
||||||
}
|
}
|
||||||
|
|
||||||
int clipPositionScaleKey_ = Shader.PropertyToID("_ClipPositionScale");
|
|
||||||
void UpdateMaterial()
|
void UpdateMaterial()
|
||||||
{
|
{
|
||||||
width = transform.localScale.x;
|
width = transform.localScale.x;
|
||||||
|
|||||||
Reference in New Issue
Block a user