mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Merge pull request #437 from witcher112/master
Unity 5 and Windows Phone building fixes
This commit is contained in:
commit
ed35664230
@ -86,7 +86,13 @@ namespace Spine {
|
|||||||
using (var input = new BufferedStream(Microsoft.Xna.Framework.TitleContainer.OpenStream(path)))
|
using (var input = new BufferedStream(Microsoft.Xna.Framework.TitleContainer.OpenStream(path)))
|
||||||
{
|
{
|
||||||
#else
|
#else
|
||||||
using (var input = new BufferedStream(new FileStream(path, FileMode.Open))) {
|
#if UNITY_WP8 || UNITY_WP8_1
|
||||||
|
using (var input = new FileStream(path, FileMode.Open))
|
||||||
|
{
|
||||||
|
#else
|
||||||
|
using (var input = new BufferedStream(new FileStream(path, FileMode.Open)))
|
||||||
|
{
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
SkeletonData skeletonData = ReadSkeletonData(input);
|
SkeletonData skeletonData = ReadSkeletonData(input);
|
||||||
skeletonData.name = Path.GetFileNameWithoutExtension(path);
|
skeletonData.name = Path.GetFileNameWithoutExtension(path);
|
||||||
|
|||||||
@ -18,7 +18,11 @@ public class RaggedySpineboy : MonoBehaviour {
|
|||||||
|
|
||||||
void AddRigidbody () {
|
void AddRigidbody () {
|
||||||
var rb = gameObject.AddComponent<Rigidbody2D>();
|
var rb = gameObject.AddComponent<Rigidbody2D>();
|
||||||
|
#if UNITY_5_1
|
||||||
|
rb.freezeRotation = true;
|
||||||
|
#else
|
||||||
rb.fixedAngle = true;
|
rb.fixedAngle = true;
|
||||||
|
#endif
|
||||||
naturalCollider.enabled = true;
|
naturalCollider.enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user