こんばんわ。
haruruです。
今日も深夜のunity・・躓きの連続・・
まず、昨日のシーンジャンプはうまくいきました。(半分)
ですが、sceneを越えた後に特定の座標に移動してほしいので
using UnityEngine;
using System.Collections;
public class mapJump : MonoBehaviour {
public string nextScene;
public float x = 0.0f;
public float y = 0.0f;
public float z = 0.0f;
void OnTriggerEnter() { Application.LoadLevel(nextScene); transform.Position = new Vector3(x, y, z); } }
という感じで書いたら、これを割り当ててる城が飛んでいきます。。
(そりゃそうか・・)
飛んでほしいのは自機なのに・・
そして、自機を破棄しない処理
using UnityEngine;
using System.Collections;
public class Parmanent : MonoBehaviour {
public GameObject pc01;
void Awake(){ DontDestroyOnLoad (pc01);
}
}
これもうまく行きません。コンパイルエラーしている、と怒られます・・
解決策、ご教授いただければ幸いです。
本日も何卒宜しくお願いいたします。。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2015/06/16 16:24
2015/06/16 16:32
2015/06/17 00:38
2015/06/18 16:00