블로그 이미지
Every unexpected event is a path to learning for you.

카테고리

분류 전체보기 (2737)
Unity3D (817)
Programming (474)
Server (33)
Unreal (4)
Gamebryo (56)
Tip & Tech (228)
협업 (58)
3DS Max (3)
Game (12)
Utility (136)
Etc (96)
Link (32)
Portfolio (19)
Subject (90)
iOS,OSX (53)
Android (14)
Linux (5)
잉여 프로젝트 (2)
게임이야기 (3)
Memories (20)
Interest (38)
Thinking (38)
한글 (30)
PaperCraft (5)
Animation (408)
Wallpaper (2)
재테크 (18)
Exercise (3)
나만의 맛집 (3)
냥이 (10)
육아 (16)
Total
Today
Yesterday
04-26 06:22

■iOSの広告識別子「IDFA=Advertising Identifier」

■Androidの広告ID「ADID=AdvertisingID」

■実機操作による確認方法
 ・Android
  「設定」->「Google」->「広告」で広告IDを確認

 ・iPhone
  わかんない

●Unity公式のサンプルスクリプト
https://docs.unity3d.com/jp/540/ScriptReference/Application.RequestAdvertisingIdentifierAsync.html

advertisingId には広告ID
enabledにはユーザーが広告IDを使用させるか?の有無が返ってくる

■自分用にソース

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

public class GetIdfaAndAdid : MonoBehaviour {

    [SerializeField]
    public Text DisplayID;

    // ボタンが押されると呼ばれる
    public void GetID()
    {
        Debug.Log("■■■■■GetID()■■■■■");
        // IDFA
        Application.RequestAdvertisingIdentifierAsync(
                (string advertisingId, bool trackingEnabled, string error) =>
                {
                    Debug.Log("advertisingId=" + advertisingId + " enabled=" + trackingEnabled + " error=" + error);
                    DisplayID.text = "advertisingId=" + advertisingId + " enabled=" + trackingEnabled + " error=" + error;

                }
        );
    }
}

■参考URL
https://reviewlog.info/adid-android/
https://reviewlog.info/ios-idfa-reset/
https://stackoverflow.com/questions/34193282/apple-idfa-in-unity-via-plugin

Appleの規約
https://support.apple.com/ja-jp/HT205223



[출처] https://qiita.com/satotin/items/f4afb0a08adbec26a062

[참조] https://docs.unity3d.com/ScriptReference/Application.RequestAdvertisingIdentifierAsync.html

반응형
Posted by blueasa
, |

[Asset] Obfuscator

Unity3D/Encrypt / 2017. 11. 17. 10:02

현재 유니티 프로젝트에서 사용중인 난독화 에셋(유료)

 

[링크] https://assetstore.unity.com/packages/tools/utilities/obfuscator-48919

 

Obfuscator | 유틸리티 | Unity Asset Store

Get the Obfuscator package from Beebyte and speed up your game development process. Find this & other 유틸리티 options on the Unity Asset Store.

assetstore.unity.com

 

 

 

반응형
Posted by blueasa
, |
반응형
Posted by blueasa
, |
반응형
Posted by blueasa
, |

Last Christmas I bought my wife and myself a Synology NAS to store our pictures on. Given that I’d spent a lot of time over the last few years working on Git LFS, I always thought it would be pretty cool if you could use the NAS as an LFS server.

Like everything else these days, the thing can run apps. I looked around for what it would take to make an app for it and what I found seemed to be mostly a bunch of flaming hoops to jump through. I’m pretty lazy, so I dropped it.

The other day I was checking out Home Assistant and noticed it could be installed on the Synology via Docker. Wait … what? You can run Docker on it‽ Far out! It is Linux, so I guess that makes sense. Now it should be easy to set up an LFS server on it. We have a reference server that’ll do just fine for this.

To get running, first install the Docker app from Package Center. Start the app and head to the Registrytab. It’s hooked up to DockerHub by default. The search seems to love returning results for things you didn’t ask for, so it’s best to just search for rubyist. Searching for rubyist/git-lfs-server is far too specific, I guess, but that’s what you’re looking for. Click Download for download.

Once it’s downloaded, it’ll appear in the Image tab. Click Launch to launch.

This brings up the Docker app’s container wizard. It’s actually quite nice. Click the Advanced Settingsbutton. Set the following options in their respective tabs:

  • Advanced Settings: Enable auto-restart
  • Volume: Add a folder on the drive at a Mount Path of /var/git-lfs
  • Network: Select “Use the same network as Docker Host”
  • Environment: Configure any environment vars for the server

The full set of supported environment variables can be found in the lfs-test-server README, here are the ones you’ll need to set:

  • LFS_HOST: The host name of your NAS
  • LFS_ADMINUSER: The username of the admin user
  • LFS_ADMINPASS: The admin password

When setting LFS_HOST you’ll need to include the port that the LFS server is running on, which will be ":8080". For example, "foobar.localdomain:8080".

Once you’re done there, close the advanced settings and click the Next button. You’ll see a summary of the config. Click Apply.

Your LFS server is now running! Configure LFS by adding the following to the .lfsconfig file in the root of your repo:

[lfs]
	url="http://foobar.localdomain:8080/rubyist/myrepo"

If you have questions, tweet at @rubyist, I might answer.



[출처] https://killring.io/post/synology-for-lfs/

반응형
Posted by blueasa
, |

유니티에서 아이폰X의 하단 Home Indicator 비활성화 하는 방법 찾다가


유니티는 어느 클래스에 넣으란건지 몰라서 헤멨는데 알맞은 답변을 찾아서 펌~


[추가2]

Unity v5.6.5f1 이상에서 Build Settings에 옵션이 추가 됐는데 하단 소스 대응되는 옵션 스크린샷 추가 해놓음.

1. - (BOOL)prefersHomeIndicatorAutoHidden; // add this

-> Off 돼 있어야 함.


2. - (UIRectEdge)preferredScreenEdgesDeferringSystemGestures; // add this

-> 모두 On


[추가]

아래 소스를 적용해보니 Home Indicator가 Hide 되긴 하는데 아무 곳이나 터치(드래그 아님) 하면 Home Indicator가 활성화 되는 문제가 있어서 다른팀에 문의해보니 prefersHomeIndicatorAutoHidden을 YES로 하면 안된다고 한다.

prefersHomeIndicatorAutoHidden을 소스에서 없애라고 함.

없애고 테스트 해보니 원하는대로 동작(비활성화 상태에서 드래그하면 활성화 되면서 1회 드래그 무시)한다.


[설명]

Unity 5.6.4f1

XCode 9.1


XCode Project-Classes-UI 폴더에 가면 UnityViewControllerBaseiOS.h / UnityViewControllerBaseiOS.mm 파일이 있음.

해당 파일에 아래 add this 주석 달린 소스 추가


[참고]

This is for both status and edge protection


UnityViewControllerBaseiOS.h

Code (CSharp):
  1.  
  2. @interface UnityViewControllerBase : UIViewController
  3. {
  4. }
  5.  
  6. - (BOOL)shouldAutorotate;
  7.  
  8. - (BOOL)prefersStatusBarHidden;
  9. - (UIStatusBarStyle)preferredStatusBarStyle;
  10. - (BOOL)prefersHomeIndicatorAutoHidden; // add this
  11. - (UIRectEdge)preferredScreenEdgesDeferringSystemGestures; // add this
  12. @end
  13.  

UnityViewControllerBaseiOS.mm

Code (CSharp):
  1.  
  2. - (BOOL)shouldAutorotate
  3. {
  4.     return YES;
  5. }
  6.  
  7. // add this
  8. - (BOOL)prefersHomeIndicatorAutoHidden
  9. {
  10.     return YES;
  11. }
  12.  
  13. // add this
  14. - (UIRectEdge)preferredScreenEdgesDeferringSystemGestures
  15. {
  16.     return UIRectEdgeAll;
  17. }
  18.  
  19. - (BOOL)prefersStatusBarHidden
  20. {
  21. ....
  22.  



[출처] https://forum.unity.com/threads/option-to-hide-iphone-x-home-indicator-edge-protection.500991/



반응형
Posted by blueasa
, |

UnityEngine.iOS.Device.generation 체크


[참조1] https://docs.unity3d.com/kr/current/ScriptReference/iOS.Device-generation.html

[참조2] https://docs.unity3d.com/kr/current/ScriptReference/iOS.DeviceGeneration.html

반응형
Posted by blueasa
, |

以下はUnity2017.1.1f1Xcode9.0GMで確認しています。

前置き

iPhoneXの対応がめんどくさそう
https://developer.apple.com/ios/human-interface-guidelines/overview/whats-new/

やりたいこと

Unity側でいちいち対応するのは面倒なので、Unityの描画領域を変更して、
iPhoneXの場合は上下に余白を持たせれば良いのでは?という案。

iPhone 8iPhoneX beforeiPhoneX after
iphonex8p.pngiphonex1.pngiphonex2.png

iPhoneX beforeの画像は、iPhone 8の画像と同じコードをそのまま実行したものです。
どう表示されるかはもちろんUnityでの実装によりますが、このサンプルの場合は
画面上部に合わせてテキストを表示しているので、iPhoneXの凹部に隠れてしまっています。

iPhoneX afterの画像は、Unityの描画領域を上50pt、下40pt短くし、余白部分に画像を設定しています。
ついでにステータスバーも表示しています。

ソース

GitHubに上げました。
https://github.com/tkyaji/UnityIPhoneXSupport

UnityIPhoneXSupport.unitypackage をインポートすると、
PostProcessBuildでビルド時にUnityのソースを書き換えて、余白を設定するようになります。

余白のサイズと色、または画像を定数で指定できます。

やってること

1. iPhoneXの場合、ステータスバーを表示する

iPhoneXではステータスバーの非表示は非推奨とのことなので、表示するようにします。

UnityのPlayerSettingsで、Status Ber Hiddenが設定されている場合のみ以下の処理を行います。

  • Info.plistの設定を、ステータスバー表示とする
  • UnityViewControllerBaseiOS.mmを書き換え、iPhoneXの場合は表示、それ以外は非表示とする

2. UnityのViewサイズを変更する

UnityAppController.mmUnityView.mmを書き換え、UIWindowUIViewのサイズをそれぞれ変更します。
高さを90pt短くし、Windowの位置を50pt下げています。
これで上50pt、下40ptの余白ができます。
上下余白部分にUIViewをそれぞれ設定し、色を設定します。
さらに画像がある場合はUIImageViewaddSubViewします。

備考

  • シミュレータで少し確認しただけなので、もしかしたら色々問題があるかもしれません。使用する場合は自己責任でお願いします。
  • iPhoneXのSafe Areaは左右にも余白があるため、ちゃんとやるなら左右にも気を使う必要がありそうです
  • 余白部分がただの黒帯とかだと、そのせいでリジェクトになる可能性があるかもしれません
  • iPhoneXかどうかは画面アスペクト比でざっくり判定しています



[출처] https://qiita.com/tkyaji/items/8cdc0a4324d4e89633e8

반응형
Posted by blueasa
, |



[링크] https://bitbucket.org/Unity-Technologies/assetbundledemo


[링크] https://assetstore.unity.com/packages/tools/utilities/assetbundle-manager-example-scenes-45836

반응형
Posted by blueasa
, |

XCode 최신 버전으로 업데이트 하고나서 빌드 하려니 GA 관련 Link 에러가 나서 찾아봤더니 아래 프레임워크가 필요하다고 한다.


리스트를 살펴보니 CoreData.framework가 빠져 있어서 수동 추가 후 정상 빌드 확인..




The Google Analytics SDK uses the CoreData and SystemConfiguration frameworks, so you will need to add the following to your application target's linked libraries:

  • libGoogleAnalyticsServices.a
  • AdSupport.framework
  • CoreData.framework
  • SystemConfiguration.framework
  • libz.dylib



[출처] https://stackoverflow.com/questions/22008892/google-analytics-doesnt-work-on-new-ios-project

반응형
Posted by blueasa
, |