万年素人からHackerへの道

万年素人がHackerになれるまで殴り書きするぜ。

  • ・資産運用おすすめ
    10万円は1000円くらい利益
    資産運用ブログ アセマネ
    • ・寄付お願いします
      YENTEN:YYzNPzdsZWqr5THWAdMrKDj7GT8ietDc2W
      BitZenny:ZfpUbVya8MWQkjjGJMjA7P9pPkqaLnwPWH
      c0ban:8KG95GXdEquNpPW8xJAJf7nn5kbimQ5wj1
      Skycoin:KMqcn7x8REwwzMHPi9fV9fbNwdofYAWKRo

    1日でクラウドサービスをマスター! 全部できるまで帰しま10!

    コレに参加 http://japan.unity3d.com/blog/press/20161121

    プロジェクト入れると変なワーニング・・・

    A default asset was created for 'Assets/Etc/playGROWnd/playground/Audio/Musics/NewAudioMixer 1.mixer' because the asset importer crashed on it last time.
    You can select the asset and use the 'Assets -> Reimport' menu command to try importing it again, or you can replace the asset and it will auto import again.

    IStoreListenerがないとかのエラー。

    IAP BuildをONにする。

    →なぜかONにしなくてもエラーが出なかった。おかしいなー。Nifty Cloud BuildをONにたあとあたりから?

    クラウドビルド Build SettingsはAndroidにする必要はない

    最初のクマの選択 IAPだとクマにする予定だった。

    Drチャールズ

    雲のボタンで紐付ける New Link

    SETTINGS => Unlink Project コレで外れる。

    Create => 自分のを選ぶ SETTINGS => 自分のに変わる

    1. 【Unity Collaborate】Unity CollaborateをONにしてチーム開発が出来るようにする

    【Unity Collaborateとは?】 ・チーム開発の出来るもの ・5.5から標準 ・まだBeta ・Asset Serverみたいなもの ・プロジェクトを他の人に反映する ・git/SubVersionみたいなものだがそれほど高機能ではない  → ブランチを切れないという不便 シーンは上書きハッカソンやシーンはチームに声を掛け合う、マルチシーンエディッチング

    [手順] 1. 雲のマーク -> Collaborate

    f:id:shinriyo:20161211115354p:plain

    このボタンでもいい f:id:shinriyo:20161211171512p:plain

    1. Webブラウザ ログインが始まる

    そのあとMac/Window選択が出るので、自分の環境のをDLして

    f:id:shinriyo:20161211114544p:plain

    インストール

    f:id:shinriyo:20161211114521p:plain

    2.【Unity Cloud Build】Unity Cloud Buildを使ってAndroidビルドをできるようにする

    Perforce 最新のビルドを使って 変更を検知して勝手にビルドapkを作ってくれる

    On cooldown for: 00:24:57
    クールダウン 無料は1時間位

    AndroidはInputが動かないのでひょっとしたら動かないかも?

    iOSの場合

    Macでしか出来ない http://blog.naichilab.com/entry/2015/09/09/074800

    Certificates, IDs & Profiles リンクどこ? https://developer.apple.com/account/ios/certificate だが変なリンク・・

    http://stackoverflow.com/questions/36935087/cant-access-certificates-identifiers-profiles-within-developer-apple-com

    But you can able to run on any device With Xcode 7 you are no longer required to have a developer account in order to test your apps on your device

    Xcode 7はアカウント不要だったらしいー。 僕のは8だわ。諦めよう。インストールめんどいし。

    3. 【ニフティクラウド mobile backend】会員登録・ログイン機能を作ろう

    ニフティクラウド mobile backend

    ・事例 ひとりぼっち惑星 君の目的は僕を殺すこと 伝説の旅団 ネコ屋台

    ・機能 push Notification データの保存 Cloud 7みたいなの サーバの機能

    mBaaS・・mobile backend as a service

    会員登録が機能 API

    ・料金 http://mb.cloud.nifty.com/price.htm

    ユーザ管理のためSignUP機能を登録する

    【手順】 ・会員登録 f:id:shinriyo:20161211140943p:plain

    ・アプリの作成 kaerema10 f:id:shinriyo:20161211140952p:plain

    ・ NCMBSettings

    DataStoreは今日やらない。

    File Store機能

    Menu Window/Unity IAP/Android/Target Amazon can’t be checked because it doesn’t exist UnityEditor.EditorApplication:Internal_CallDelayFunctions()

    へんなえらーIAP

    サインアップにメールアドレスはなくてもOK

    Qiita http://qiita.com/fumishitan/private/96c11800babb92cae6ca

    正解 https://github.com/hounenhounen/UnityLoginApp

    NCMB = NiftyCloud Backendか?

    uuid 絶対にかぶらないシステム Unityに実装されている

    4. 【ニフティクラウド mobile backend】Id,PWを自動で発行し会員登録ができる機能を作ろう

    会員登録の障壁をなくすためSignUp

    5. 【ニフティクラウド mobile backend】 アプリ内にお知らせ機能を作りましょう

    公開ファイルの機能 モバイルバックエンド ファイルストア 相対パス JSやCSSを紐付けでける お知らせ機能

    ファイルストアはhttpsにしないと公開にならない 相対パス フォルダが作れない

    6. 【Unity Analytics】Unity AnalyticsをONにしてDAUを取れるようにする

    IAPをONにすると勝手にONになる Daily Active User

    Unity Ads iOS/Androidに変えておかないとだめ

    7. 【Unity Analytics】ゲームオーバー時にコインの数をカスタムイベントで送信する

    コードを書く必要あり

    どのユーザが?いくつ?スコアの送信する

    using UnityEngine.Analytics;
    Analytics.CustomEvent();

    CompleteProject GameOverController.cs

    CompleteProject PlayerController.cs int countがコイン数

    Inspectorから行ける f:id:shinriyo:20161211171336p:plain

    インテグレーション →高度なインテグレーション →カスタムイベント f:id:shinriyo:20161211171427p:plain 検証

    8. 取得したデータからプレイヤーのプレイヤーの動向を分析

    https://analytics.cloud.unity3d.com/ → Demo Appを見る

    1. 「levelComplete」を達成した全てのユーザーのスコアの平均値を求めよ

    「Event Manager」から行ける データエクスプローラから「カスタムイベント」 averageにする

    f:id:shinriyo:20161211172936p:plain

    2.ファネル分析を使って、どのステージで離脱しているかを分析せよ

    レベルが3つ有る

    f:id:shinriyo:20161211172920p:plain

    9.UnityAdsをONにして動画広告を表示し、マネタイズする

    gameId が重要

    ・その1

    かんたんな見つけ方。 Servicesから辿れる。

    f:id:shinriyo:20161211180812p:plain

    ・その2 https://dashboard.unityads.unity3d.com/ ここから 下の方のプロジェクトを押下し、 f:id:shinriyo:20161211180519p:plain

    コレを見ても行けた f:id:shinriyo:20161211180548p:plain

    【手順】

    http://unityads.unity3d.com/help/monetization/2.0-upgrade-guide-unity

    Initializeが必須

    iOSAndroidのみサポートのため

    if(Advertisement.isSupported) {
        Advertisement.Initialize (gameID);
    }

    表示される状態化をチェック

    if (Advertisement.IsReady())
    {
        Advertisement.Show();
    }

    これはなんだろうか? つけても外しても変わらない。 f:id:shinriyo:20161211180858p:plain がんばれUnity!ゲーム開発の民主化

    これはなに? Integration Guide for Unity - Knowledge base なぜ、#if !UNITY_ADSをつけてるの?????

    C# Example – ShowAdOnStart.cs
    
    using UnityEngine;
    using System.Collections;
    using UnityEngine.Advertisements; // Using the Unity Ads namespace.
    
    public class ShowAdOnStart : MonoBehaviour
    {
        #if !UNITY_ADS // If the Ads service is not enabled...
        public string gameId; // Set this value from the inspector.
        public bool enableTestMode = true;
        #endif
    
        IEnumerator Start ()
        {
            #if !UNITY_ADS // If the Ads service is not enabled...
            if (Advertisement.isSupported) { // If runtime platform is supported...
                Advertisement.Initialize(gameId, enableTestMode); // ...initialize.
            }
            #endif
    
            // Wait until Unity Ads is initialized,
            //  and the default ad placement is ready.
            while (!Advertisement.isInitialized || !Advertisement.IsReady()) {
                yield return new WaitForSeconds(0.5f);
            }
    
            // Show the default ad placement.
            Advertisement.Show();
        }
    }

    10.動画広告の再生が成功したら、プレイヤーにインセンティブを与える

    Code Samples

    switchでできる。 スキップしたかどうかを見る