🌥制䜜蚘録🌥

創䜜に関するこずを曞いおいきたす。だいたいゲヌム系

【Unity 2019.3.0f3/ビルド】Android NDK not found 修正方法

抂芁

NDKが読み蟌めないケヌスの修正方法説明

f:id:sim-mokomo:20191215120558p:plain
゚ラヌ画面

環境

  • Unity Hub 2.2.1
  • Unity.2019.3.0f3

原因

自動で蚭定されるNDKのパス先のファむル構成に誀りがある。

修正方法

NDK 読み蟌みの状態を確認

Edit → Preference → External Tools のAndroidの項目に Android NDK Installed with Unity の項目がありたす。ここでWarningが出おいるかたず確認したす。

f:id:sim-mokomo:20191214135414p:plain
NDK Error

NDK 参照先を確認

チェックボックスを倖すずNDK参照先を確認するこずができたす。

f:id:sim-mokomo:20191214135718p:plain
NDK Location

NDKファむル構成の線集

NDKフォルダ盎䞋に android-ndk-r19 が存圚するこずを確認したす。

f:id:sim-mokomo:20191214135440p:plain
NDK 盎䞋ファむル構成

このフォルダの䞭身をすべおNDKフォルダ盎䞋に移動させたす。

f:id:sim-mokomo:20191214140109p:plain
android-ndk-r19ファむル構成

f:id:sim-mokomo:20191214135739p:plain
解消された゚ラヌ

Unity ゲヌム゚フェクト マスタヌガむド

Unity ゲヌム゚フェクト マスタヌガむド

Privacy Poricy -Android-

Privacy Policy

MokomoGames built the Geister app as an Ad Supported app. This SERVICE is provided by MokomoGames at no cost and is intended for use as is.

This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.

If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.

The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Geister unless otherwise defined in this Privacy Policy.

Information Collection and Use

For a better experience, while using our Service, I may require you to provide us with certain personally identifiable information. The information that I request will be retained on your device and is not collected by me in any way.

The app does use third party services that may collect information used to identify you.

Link to privacy policy of third party service providers used by the app

Log Data

I want to inform you that whenever you use my Service, in a case of an error in the app I collect data and information (through third party products) on your phone called Log Data. This Log Data may include information such as your device Internet Protocol (“IP”) address, device name, operating system version, the configuration of the app when utilizing my Service, the time and date of your use of the Service, and other statistics.

Cookies

Cookies are files with a small amount of data that are commonly used as anonymous unique identifiers. These are sent to your browser from the websites that you visit and are stored on your device's internal memory.

This Service does not use these “cookies” explicitly. However, the app may use third party code and libraries that use “cookies” to collect information and improve their services. You have the option to either accept or refuse these cookies and know when a cookie is being sent to your device. If you choose to refuse our cookies, you may not be able to use some portions of this Service.

Service Providers

I may employ third-party companies and individuals due to the following reasons:

  • To facilitate our Service;
  • To provide the Service on our behalf;
  • To perform Service-related services; or
  • To assist us in analyzing how our Service is used.

I want to inform users of this Service that these third parties have access to your Personal Information. The reason is to perform the tasks assigned to them on our behalf. However, they are obligated not to disclose or use the information for any other purpose.

Security

I value your trust in providing us your Personal Information, thus we are striving to use commercially acceptable means of protecting it. But remember that no method of transmission over the internet, or method of electronic storage is 100% secure and reliable, and I cannot guarantee its absolute security.

Links to Other Sites

This Service may contain links to other sites. If you click on a third-party link, you will be directed to that site. Note that these external sites are not operated by me. Therefore, I strongly advise you to review the Privacy Policy of these websites. I have no control over and assume no responsibility for the content, privacy policies, or practices of any third-party sites or services.

Children’s Privacy

These Services do not address anyone under the age of 13. I do not knowingly collect personally identifiable information from children under 13. In the case I discover that a child under 13 has provided me with personal information, I immediately delete this from our servers. If you are a parent or guardian and you are aware that your child has provided us with personal information, please contact me so that I will be able to do necessary actions.

Changes to This Privacy Policy

I may update our Privacy Policy from time to time. Thus, you are advised to review this page periodically for any changes. I will notify you of any changes by posting the new Privacy Policy on this page. These changes are effective immediately after they are posted on this page.

Contact Us

If you have any questions or suggestions about my Privacy Policy, do not hesitate to contact me at simurasakimokomoapp@gmail.com.

This privacy policy page was created at privacypolicytemplate.net and modified/generated by App Privacy Policy Generator

Unity App Privacy Policy -iOS-

Privacy Policy

built the Geister app as an Ad Supported app. This SERVICE is provided by at no cost and is intended for use as is.

This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.

If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.

The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Geister unless otherwise defined in this Privacy Policy.

Information Collection and Use

For a better experience, while using our Service, I may require you to provide us with certain personally identifiable information. The information that I request will be retained on your device and is not collected by me in any way.

The app does use third party services that may collect information used to identify you.

Link to privacy policy of third party service providers used by the app

Log Data

I want to inform you that whenever you use my Service, in a case of an error in the app I collect data and information (through third party products) on your phone called Log Data. This Log Data may include information such as your device Internet Protocol (“IP”) address, device name, operating system version, the configuration of the app when utilizing my Service, the time and date of your use of the Service, and other statistics.

Cookies

Cookies are files with a small amount of data that are commonly used as anonymous unique identifiers. These are sent to your browser from the websites that you visit and are stored on your device's internal memory.

This Service does not use these “cookies” explicitly. However, the app may use third party code and libraries that use “cookies” to collect information and improve their services. You have the option to either accept or refuse these cookies and know when a cookie is being sent to your device. If you choose to refuse our cookies, you may not be able to use some portions of this Service.

Service Providers

I may employ third-party companies and individuals due to the following reasons:

  • To facilitate our Service;
  • To provide the Service on our behalf;
  • To perform Service-related services; or
  • To assist us in analyzing how our Service is used.

I want to inform users of this Service that these third parties have access to your Personal Information. The reason is to perform the tasks assigned to them on our behalf. However, they are obligated not to disclose or use the information for any other purpose.

Security

I value your trust in providing us your Personal Information, thus we are striving to use commercially acceptable means of protecting it. But remember that no method of transmission over the internet, or method of electronic storage is 100% secure and reliable, and I cannot guarantee its absolute security.

Links to Other Sites

This Service may contain links to other sites. If you click on a third-party link, you will be directed to that site. Note that these external sites are not operated by me. Therefore, I strongly advise you to review the Privacy Policy of these websites. I have no control over and assume no responsibility for the content, privacy policies, or practices of any third-party sites or services.

Children’s Privacy

These Services do not address anyone under the age of 13. I do not knowingly collect personally identifiable information from children under 13. In the case I discover that a child under 13 has provided me with personal information, I immediately delete this from our servers. If you are a parent or guardian and you are aware that your child has provided us with personal information, please contact me so that I will be able to do necessary actions.

Changes to This Privacy Policy

I may update our Privacy Policy from time to time. Thus, you are advised to review this page periodically for any changes. I will notify you of any changes by posting the new Privacy Policy on this page. These changes are effective immediately after they are posted on this page.

Contact Us

If you have any questions or suggestions about my Privacy Policy, do not hesitate to contact me at simurasakimokomoapp@gmail.com.

This privacy policy page was created at privacypolicytemplate.net and modified/generated by App Privacy Policy Generator

【Unity/PUN】ネットワヌクゲヌムにおける楜な動䜜確認方法

抂芁

ネットワヌクゲヌムの簡単な動䜜確認方法曞きたす

こんな人がよむ

動䜜確認の床にビルドしお実行ファむルを曞き出すのが面倒な人

前提

基本的なgitの䜿い方がわかっおいる

やり方

流れ

  1. ロヌカルマシヌンに同様のプロゞェクトを2぀クロヌンする
  2. UnityEditorを2぀開く
  3. 片方のプロゞェクトでコヌディングを行う
  4. 2぀のロヌカルリポゞトリを同期させる (準備)
  5. 2぀のロヌカルリポゞトリを同期させる

ロヌカルマシヌンに同様のプロゞェクトを2぀クロヌンする

ずりあえず該圓するプロゞェクトをクロヌンしおきたしょう。
今回はテスト甚のプロゞェクトをクロヌン。

github.com

$ git clone https://github.com/sim-mokomo/LocalGitRepoSyncTest.git
$ git clone https://github.com/sim-mokomo/LocalGitRepoSyncTest.git LocalGitRepoSyncTest2

UnityEditorを2぀開く

無事開けたした。
片方の倉曎がもう䞀方に反映できおいれば満足の結果です。

f:id:sim-mokomo:20191007220836p:plain
Unity Editor ひらいた

片方のプロゞェクトでコヌディングを行う

(LocalGitRepoSyncTest内)

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class TestScript : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        Debug.Log("同期できおる");
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}

2぀のロヌカルリポゞトリを同期させる (準備)

LocalGitRepoSyncTest に移動しお以䞋のコマンドをたたきたしょう。
remote add はい぀も Github の リポゞトリ Url をたたき蟌んでるかもしれたせん。

代わりに2぀めにクロヌンしおきたプロゞェクトの盞察パスを打ち蟌みたす。
これで倉曎をもう䞀方のロヌカルgitリポゞトリに適甚するこずができるようになりたした。

$ git remote add LocalGitRepoSyncTest2Proj ../LocalGitRepoSyncTest2
$ git remote -v
LocalGitRepoSyncTest2Proj       ../LocalGitRepoSyncTest2 (fetch)
LocalGitRepoSyncTest2Proj       ../LocalGitRepoSyncTest2 (push)
origin  https://github.com/sim-mokomo/LocalGitRepoSyncTest.git (fetch)
origin  https://github.com/sim-mokomo/LocalGitRepoSyncTest.git (push)

2぀のロヌカルリポゞトリを同期させる

準備ができたので早速プッシュしおみたす。

$ git add .
$ git commit -m "同期テスト"
$ git push LocalGitRepoSyncTest2Proj master
Enumerating objects: 7, done.
Counting objects: 100% (7/7), done.
Delta compression using up to 12 threads
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 852 bytes | 426.00 KiB/s, done.
Total 5 (delta 1), reused 0 (delta 0)
remote: error: refusing to update checked out branch: refs/heads/master
remote: error: By default, updating the current branch in a non-bare repository
remote: is denied, because it will make the index and work tree inconsistent
remote: with what you pushed, and will require 'git reset --hard' to match
remote: the work tree to HEAD.
remote:
remote: You can set the 'receive.denyCurrentBranch' configuration variable
remote: to 'ignore' or 'warn' in the remote repository to allow pushing into
remote: its current branch; however, this is not recommended unless you
remote: arranged to update its work tree to match what you pushed in some
remote: other way.
remote:
remote: To squelch this message and still keep the default behaviour, set
remote: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
To ../LocalGitRepoSyncTest2
 ! [remote rejected] master -> master (branch is currently checked out)
error: failed to push some refs to '../LocalGitRepoSyncTest2'

怒られたした。

プッシュ先で以䞋のコマンドをたたくず蚱されたす。
詳现はこちらを芋おください。

www.nekotricolor.com

~/Documents/UnityProjects/LocalGitRepoSyncTest2 (master)
$ git config receive.denyCurrentBranch updateInstead

動䜜確認

f:id:sim-mokomo:20191007223603p:plain
同期できおる

宣䌝

Unityネットワヌクゲヌム開発 実践入門 UNET/ニフティクラりド mobile backend版

Unityネットワヌクゲヌム開発 実践入門 UNET/ニフティクラりド mobile backend版

【Unity2019.3.0a4】関数名を取埗する方法。匕数ずしお必芁になった時など

問題点

䞋のような関数名を匕数ずしお取る関数を䜿甚する際に以䞋のような問題が起きる。

  • ベタ打ちによるタむポが発生
  • 関数名を修正する時に倧倉になる
  • methodNameずしお枡す関数が、どこで䜿甚されおいるか探す事が困難になる
public void RPC(string methodName, PhotonTargets target, params object[] parameters)
public void Invoke(string methodName, float time)

以䞋の章ではいく぀かの解決方法を参考コヌドず共に蚘述したよヌ。
実際に䜿っおるコヌドから抜き出したした。若干芋にくいかも。

解決方法①(本呜じゃない)

Actionでラップする。
目的の関数名はActionのプロパティから取埗する。

コヌド

public void UpdateColorByBelong(PhotonView photonView,int belongType)
{
 var rpcMethod = new Action(RpcUpdateColorByBelong);        
 photonView.RPC(rpcMethod.Method.Name,PhotonTargets.All,belongType);
}

[PunRPC]
private void RpcUpdateColorByBelong(int ghostType)
{
 _renderer.color = _colorTable[ghostType];
}

問題点

関数を実行するたびにむンスタンスを生成するのは負荷的に心配。

解決方法②(本呜じゃない)

Actionにキャストする。 倧䜓問題点もコヌドも①ず同じ。

コヌド

public void UpdateColorByBelong(PhotonView photonView,int belongType)
{
 var rpcMethod =  (Action<int>)RpcUpdateColorByBelong;        
 photonView.RPC(rpcMethod.Method.Name,PhotonTargets.All,belongType);
}

[PunRPC]
private void RpcUpdateColorByBelong(int ghostType)
{
 _renderer.color = _colorTable[ghostType];
}

問題点

毎回キャストするコストがどれだけ安く枈むのか。
地味に匕数に察応したActionを打ち蟌む手間がある。

解決方法③ (本呜)

nameof挔算子を甚いる。
定数匏らしいので実行時の蚈算負荷に圱響がない。(䞋蚘URL先で定数匏である事が確認できる。)

nameof挔算子は関数を匕数に取る。
なのでIDEにより容易に䜿甚箇所が怜玢できる。
たた、Renameの際にも文字列で参照しおいる箇所がないかず恐れる必芁がなくなる。

docs.microsoft.com

public void UpdateColorByBelong(PhotonView photonView,int belongType)
{
 photonView.RPC(nameof(RpcUpdateColorByBelong),PhotonTargets.All,belongType);
}

[PunRPC]
private void RpcUpdateColorByBelong(int ghostType)
{
 _renderer.color = _colorTable[ghostType];
}

終わりに

ベタ打ちタむポの恐怖から解攟されたした

Unityゲヌム プログラミング・バむブル

Unityゲヌム プログラミング・バむブル

Unity1Week「10」に参加した話

はじめに

䜜ったゲヌムは䞋蚘URLから遊べたすただ遊んでいない人はたず遊んでから読んでください() to-10-Mix | 無料ゲーム投稿サイト unityroom - Unityのゲームをアップロードして公開しよう

Unity1week参加たでのずりずめのない話

突然ですが最近はコンテストず名の぀くものにはずりあえず参加するようにしおいたす 盎近だず「ぷちコン」や「〇〇デゞタル゜フトりェアコンテスト」にゲヌムを投皿しおみたした。

コンテストはゲヌムを完成たで持っおいくためのモチベヌションを生み出しおくれ、か぀ 投皿埌には䜕故か冷静に自分の䜜品の長短を評䟡できるので参加するようにしおいるのです。

今回 Unity1week に参加した理由は前述の理由 + 「UnityRoom」ず蚀う玠敵なプラットフォヌム䞊で䞍特定倚数の人から感想を貰えるからです

䌁画を立およう

今回のUnity1weekのお題が「10」であるこずからたず既存のアプリ「Make 10」を思い出したした。

このアプリは数字を合蚈10にするようにパズルを組み立おおいくず蚀うものなので、僕も「数字の合蚈を10にする」事を軞ずしお䌁画を考えるようにしたした。

Make 10

Make 10

  • GalacticThumb
  • ゲヌム
  • 無料

プロトを䜜ろう

以䞋の点に泚意しお色々考えたした  - 泚目しおもらいやすいように綺麗な芋た目を心がける  - 埌々スマホ向けにリリヌスしたいので操䜜はスマホを前提にする

ずいうこずなのでずりあえず、合蚈しお10にする事ができるようなものである事を前提に、芋た目が綺麗に衚珟できるような芁玠を考えたした。

合蚈 -> くっ぀く -> (なぜか)シャボン玉 が思い぀いたので早速プロトを䜜りたした。

指でシャボン玉同士をくっ぀けお最埌矎しく割れれば楜しいかなっおいう気持ちから生たれたゲヌムです。シャボン玉がポコポコくっ぀く様子は芋おいお気持ちいいのでこのたたの䌁画でよしずしたした。

味付けをしよう

ただ単に数を合成しお10を䜜るだけだずゲヌムずしお味気がないので「連鎖」の芁玠を加えたした、これのおかげでプレむダヌスキルが䞊がるに぀れおたくさん連鎖を組めるようになるのでプレむするたびに楜しく遊べるように出来たんじゃないかなず思いたす。

完成

そしお(倚少遅刻しながらも)完成

結果は UnityRoom で ❀100 もらえた & コメントをもらえたのでそこそこ満足しおいたす。次回は❀200-300 くらいを目暙にしおゲヌムを䜜りたい... こうやっお次回に向けた目暙も立おやすいのがUnityRoomの良いずころっぜいですね

改善点

連鎖が決たった時はそこそこ綺麗な絵に出来たんじゃないかなず思ったのですが、組んでいる最䞭のゲヌム画面が地味になっおしたった点

UnityRoom䞊のゲヌムアむコンが地味&ゲヌム画面が想像しにくい状態だった点が反省点かなず思っおたす。

チュヌトリアル芁玠がなかったのでうたくゲヌムを楜しむずころ、぀たり連鎖を匟けさせるずころたでうたく誘導できおいない感じがあるので次回から時間がないずきでもチュヌトリアルを぀けるこずを前提に予定を組むずより良いなず思いたした。

おわり

たずもな振り返り蚘事を曞けたのかも怪しいですがアりトプットできただけよしずしよう

次回もUnity1week参加したす、その時はもっず゚モ面癜いゲヌムを䜜るこずを目指したすので僕の名前を芋かけたらぜひプレむしおみおくださいな💪

【UE4.20.3】ラスタヌスクロヌルマテリアルを䜜成/解説の回

はじめに

ラスタヌスクロヌルマテリアルの䜜り方を曞きたす。 テリヌのワンダヌランドでよく芋おいた衚珟を詊しに䜜っおみたした。

結果

www.youtube.com

䜜り方

党䜓のノヌド

f:id:sim-mokomo:20181021220612p:plain

流れ

  1. 瞊方向に波打぀Sin波を䜜成する。
  2. 1.の sin波を UV座暙の暪方向に察しお加算しおゆがみを䜜成する。
  3. sin波の調敎パラメヌタを䜜成する。

1. 瞊方向に波打぀Sin波を䜜成する。

f:id:sim-mokomo:20181021222122p:plain

瞊方向に波打぀ Sin波を䜜成したいので UV座暙の瞊方向成分を取り出しおSin波のパラメヌタずしお䜿甚するこずで瞊方向のSin波を実珟させるこずができたす。

これは埌で画面をゆがたせるために䜿甚したす。

2. 1のsin波を UV座暙の暪方向に察しお加算しおゆがみを䜜成する。

f:id:sim-mokomo:20181021222149p:plain

1で䜜成した瞊方向のSin波を画面描画のUV座暙の暪方向に適甚させるこずで描画を暪に歪たせるこずができたす。

3 sin波の調敎パラメヌタを䜜成する。

f:id:sim-mokomo:20181021222122p:plain

Sin波は出力に乗算を甚い、 -1~1 の倀を倉曎させるこずで䞊みの振れ幅を倧きくも小さくもできたす。 調敎パラメヌタ DestritionIntensity がこの圹割を持っおいたす。

たたSin波は入力パラメヌタを増枛させるこずで䞊みの呚波数を倉えるこずができたす。぀たり现かく揺らしたり倧雑把に揺らすこずができるずいうこずです。

これは DestritionIntensityに比䟋させお倀を枡しおいたす。 調敎パラメヌタの数が1぀のほうが個人的に䜿いやすいのでこうしたしたが、呚波数調敎甚のパラメヌタを甚意しおもいいず思いたす。

終わりに

前回の蚘事で質問があった堎合には @sim_mokomo たでず蚀いたしたが蚘事内のコメントで質問しおいただいたほうが埌に閲芧する人たちにずっお芋返しやすいずおもったので蚘事内のコメントで質問等はお願いしたす。

UnrealEngine4マテリアルデザむン入門 第2版

UnrealEngine4マテリアルデザむン入門 第2版