初心者のUNITY開発ブログ

unity開発する時、メモーとしてブログを利用しています。

メニューの作成

using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using UnityEngine.SceneManagement; public class StageSelectManager : MonoBehaviour { public GameObject[] stageButtons; // Use this for ini…

プレーヤーに当たられば、particlesystem起動する

using System.Collections; using System.Collections.Generic; using UnityEngine; public class effects : MonoBehaviour { ParticleSystem ps; void Start () { ps = this.GetComponent<ParticleSystem>(); ps.Stop (); } void Update () { } void OnCollisionEnter(Colli</particlesystem>…

animator scriptsで動かす

using UnityEngine; public class Example:MonoBehaviour { private Animator animator; void Start() { animator = GetComponent<Animator>(); } void Update() { animator.SetBool("Walk", true); }</animator>

COCOAPADの設定

1。ターミナルを開く、最新GEMゲット sudo gem update --system 2.gemを利用してcocoapodsインストール sudo gem install -n /usr/local/bin cocoapods 3.Podfile に追加 例: pod 'Google-Mobile-Ads-SDK' pod install --repo-update

マウスで物体を動かす

using UnityEngine;using System.Collections;public class PlayerMovement : MonoBehaviour { public float speed; private Vector3 targetPosition; private bool isMoving; const int LEFT_MOUSE_BUTTON=0; void Start() { targetPosition =transform.pos…

Fire1ボタンの意味?

Fire1 :マウスの左ボタンかキーボードの左Ctrlに対応つけられている。

library not found for -Ipods-Unity-iPhone clang:error:Linker command failed with exit code 1

対処法: Build PhasesーLink Bianry With Libraries中の libPods-Unity-iPhone.aを削除すること

AdMob利用しよう

AdMOBをUNITYに取り入れる 1.「Unity用AdMob Plugin」DLしましょう https://github.com/googleads/googleads-mobile-unity/releases 「GoogleMobileAds.unitypackage」というパッケージファイルをDLし、 Unityプロジェクトにインポートしましょう。 [import]…

X-code エラー対処

【X-code】Unknown type name ‘GADGender’; did you mean ‘GADUGender’?とエラーが出た時の対処 Unknown type name ‘GADGender’; did you mean ‘GADUGender’?とエラーが出た時の対処についてお伝えします。 X-codeBuild Settings -> Apple LLVM 6.1 – Laungu…