mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 22:34:53 +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)))
|
||||
{
|
||||
#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
|
||||
SkeletonData skeletonData = ReadSkeletonData(input);
|
||||
skeletonData.name = Path.GetFileNameWithoutExtension(path);
|
||||
|
||||
@ -18,7 +18,11 @@ public class RaggedySpineboy : MonoBehaviour {
|
||||
|
||||
void AddRigidbody () {
|
||||
var rb = gameObject.AddComponent<Rigidbody2D>();
|
||||
#if UNITY_5_1
|
||||
rb.freezeRotation = true;
|
||||
#else
|
||||
rb.fixedAngle = true;
|
||||
#endif
|
||||
naturalCollider.enabled = true;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user