Archive for 4月, 2014

 

Chartboost

4月 28th, 2014

https://www.chartboost.com/ unity plugin http://blog.chartboost.com/new-unity-plugin-4-0-0-released/ 参考記事 http://ipartymobile.com/my-results-with-various-ad-networks-revmob-admob-admob-adcolony-and-chartboost/

Read full article | コメントは受け付けていません。

unity : Halo on/off

4月 27th, 2014

Behaviour halo = transform.GetComponent(“Halo”) as Behaviour; halo.enabled = true; こんなので Component, MonoBehaviourではなく Behaviourだそうです。

Read full article | コメントは受け付けていません。

unity : ios code sign error

4月 21st, 2014

unityと関係ありませんが・・・ 今までと同じなのになぜか新規登録したものがエラーに。 profisioning fileがおかしいとか app id が no matchとか言われて・・・ developer.apple.comのApp IDが重複して登録されていて Xcode iOS App ID …というのがxcodeから自動的に登録されていたようで どのタイミングで生成されてのか? 一回目のbuildで登録されたのかな? とか思ったけどそれも関係なく・・・ bundle id (com.xxxx.xxx)が間違えていただけでした。。。 修正しても同じエラーが… com.abc.efgをcom.ab.efgと間違えていて修正したのですが xcodeでarchiveを作ってvalidateするとcom.ab.efgってなんだってエラーが・・・・ Payload/aaaaa.app/aaaa のbundle idが違います見たいな Payload bundle identifier mismatch with Xcode at validation step http://stackoverflow.com/questions/19130537/payload-bundle-identifier-mismatch-with-xcode-at-validation-step で、xcodeを完全に再起動。プロジェクトを開き直すだけではダメ。 なんならPC再起動で。 なんとかエラーが出なくなりました!

Read full article | コメントは受け付けていません。

unity : ポジションからスクリーン座標 WorldToScreenPoint

4月 19th, 2014

オブジェクトのポジションからスクリーン座標を取りたい時 Camera.main.WorldToScreenPoint( transform.position ); (86.4, 382.0, 10.0) UnityEngine.Debug:Log(Object) こんな感じで取れました。 ポジションからRayで判定は Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); if (Physics.Raycast(ray, out hit)){ }

Read full article | コメントは受け付けていません。

SSL対応、verisign globalsign geotrustとか

4月 16th, 2014

heartbleedのバグのニュース等もありましたが https優遇の可能性があるそうで。 プライベートの物は、自分の証明書で良いのですが 公開サービスは外部の証明書を使おうかと ドメイン認証のみのものは安いようですね 証明書の価値はまた別ですがとりあえずhttpsで通信が主目的の場合はこれでもいいかなと思います。 サイトの信頼性、母体の信頼性という事であれば正式な証明書が良いと思います。 あとは、ブラウザの対応率に問題なければフリーの証明書でも良いと思います。 livedoor ssl

Read full article | コメントは受け付けていません。

unity : ios Does this app use the Advertising Identifier (IDFA)?

4月 15th, 2014

iOSの申請時に Does this app use the Advertising Identifier (IDFA)? というのが追加されました。 で?admobを使っているのですが? http://techcrunch.com/2014/04/11/apple-developers-must-now-agree-to-ad-identifier-rules-or-risk-app-store-rejection/ http://jp.techcrunch.com/2014/04/12/20140411apple-developers-must-now-agree-to-ad-identifier-rules-or-risk-app-store-rejection/ とりあえず、広告でIDFA使ってるよ?という感じで申請してみました。 特に何も聞かれず公開されました。 この影響か申請から僅か25時間ほどで ready for sale になりました!

Read full article | コメントは受け付けていません。

unity : url schemeでtwitter, line, facebookへリンク

4月 15th, 2014

ブラウザへ渡すときは Application.OpenURL(“https://twitter.com/intent/tweet?text=”+ WWW.EscapeURL(“test tweet”)); でいけますが、twitterアプリが開かなかったので? とりあえずandroid 4.0.3は Application.OpenURL(“twitter://post?message=”+”test tweet”); で行けました。 facebookは? fb://publish/profile/me?text=foo っぽいです。 開けましたが、テキストは入れられません。。。 facebookが上手く出来ないので日本語環境の場合lineを表示してみます。 http://media.line.me/howto/ja/ WWW.EscapeURLが + になるので .Replace(“+”,”%20″)をつけました。

Read full article | コメントは受け付けていません。

unity : c# int/int = int

4月 14th, 2014

9/10 = 0.9f を期待したのですが 9/10 = 0 となったので確認 http://msdn.microsoft.com/en-us/library/aa691373%28v=vs.71%29.aspx ということで、ゼロ以下は切り捨てとなるそうです。 9f/10 = 0.9 とfloatにして計算する事にしました。

Read full article | コメントは受け付けていません。

unity : camera culling mask of layers

4月 14th, 2014

メニューようにcameraとlayerを設定してメニューの切替をlayerの切替にしてみました。 表示 camera.cullingmask |= (1

Read full article | コメントは受け付けていません。

unity : 環境判定、他言語化 i18n

4月 10th, 2014

* 適当です。 アイテムの名前程度ですが、日本語と英語で切り替えようと http://docs.unity3d.com/Documentation/ScriptReference/Application-systemLanguage.html Application.systemLanguage.ToString(); 無事、EnglishやJapaneseが出ました Japaneseのときだけ日本語表示にしたいと思います。 データ系はとりあえずjsonで作成するので { “text”: { “hello”: { “en”:”hello”, “ja”:”はろー” } }, “items”: { “item_id” : { “name”: { “en”: “apple”, “ja”:”りんご” } } } で適当に表示させてみます。 別の話。 NullReferenceException: (null) UnityEditor.SerializedObject..ctor (UnityEngine.Object[] objs) UnityEditor.AssetImporterInspector.GetSerializedObjectInternal () UnityEditor.Editor.get_serializedObject () UnityEditor.ModelImporterClipEditor.OnEnable () 削除したりすると出るらしい unityを一度閉じると治るようです。

Read full article | コメントは受け付けていません。