//tips
//appleからの申請アプリの修正依頼
申請していたiosアプリの修正依頼が来たので対応する。
内容としては12.9-inch iPad Pro and 12.9-inch iPad Pro (3rd Generation) のスクリーンショットがiPhone画像データの引き伸ばしであるため、対応デバイスでのスクリーンショットを行なって欲しいとのこと。
Guideline 2.3.3 - Performance - Accurate Metadata
We noticed that your screenshots do not sufficiently reflect your app in use.
Specifically, your 12.9-inch iPad Pro and 12.9-inch iPad Pro (3rd Generation) screenshots reflect an iPhone image stretched out to appear to be an iPad image.
Next Steps
To resolve this issue, please revise your screenshots to ensure that they accurately reflect the app in use on the supported devices. For example, a gaming app should feature screenshots that capture actual gameplay from within the app. Marketing or promotional materials that do not reflect the UI of the app are not appropriate for screenshots.
The iPhone screenshots should reflect use on iPhone devices.
The iPad screenshots should reflect use on iPad devices.
App Store screenshots should accurately communicate your app’s value and functionality. Use text and overlay images to highlight your app’s user experience, not obscure it. Make sure app UI and product images match the corresponding device type in App Store Connect. This helps users understand your app and makes for a positive App Store experience.
Resources
For resources on creating great screenshots for the App Store, you may want to review the App Store Product Page information available on the Apple Developer website.
Please ensure you have made any screenshot modifications using Media Manager. You should confirm your app looks and behaves identically in all languages and on all supported devices. Learn more about uploading app previews and screenshots in App Store Connect Help.
Please see attached screenshot for details.
Since your App Store Connect status is Metadata Rejected, we do NOT require a new binary. To revise the metadata, visit App Store Connect to select your app and revise the desired metadata values. Once you’ve completed all changes, reply to this message in Resolution Center and we will continue the review.
XcodeのiOSシミュレータで12.9-inch iPad用の画像を作成していく。
Xcodeのシミュレータから12.9-inch iPadを起動し、フォルダからappファイルをシミュレータにドロップし、シミュレータ内でアプリを表示させようとしたが、エラーが発生。
シミュレーターでappファイルを起動させるために、赤字ファイルのリンク切れを修正し、シミュレーターにアップロード確認中。marketing versionも念のため修正しておいた。
https://stackoverflow.com/questions/56450295/cannot-run-application-on-simulator-after-installing-xcode-11-cfbundleversion
https://qastack.jp/programming/4933093/cfbundleversion-in-the-info-plist-upload-error
シミュレータの使用方法は下記を参考。
https://medium.com/eureka-engineering/%E6%9C%80%E5%BC%B7-ios%E3%82%A2%E3%83%97%E3%83%AA%E3%81%AE%E3%83%87%E3%83%90%E3%82%A4%E3%82%B9%E6%AF%8E%E3%81%AE%E7%A2%BA%E8%AA%8D%E3%82%92ios%E3%82%B7%E3%83%9F%E3%83%A5%E3%83%AC%E3%83%BC%E3%82%BF%E3%82%92%E8%A4%87%E6%95%B0%E8%B5%B7%E5%8B%95%E3%81%97%E3%81%A6%E6%9C%80%E9%80%9F%E3%81%A7%E8%A1%8C%E3%81%86-%E6%9C%80%E9%AB%98-8c5450f6323b
https://blog.codecamp.jp/programming-xcode-install#titlef5982ced090dfaf74d7ee50c8bd9570c
//クラス変数、インスタンス変数とは
クラス変数とインスタンス変数の内容の違いを忘れたので下記に調べた内容を記載。
クラス変数は「static」をつけて宣言されたメンバ変数で、コンパイル時点で作成されるため、newでインスタンスが生成されなくても使える。インスタンス変数のようにインスタンスごとに存在する変数ではないためクラスに1つしか存在しない。
インスタンス変数は「static」なしで宣言されるメンバ変数。コンパイル時点では作成されないためnewでインスタンスが生成する必要がある。インスタンスごとに存在するため複数存在するケースがある。
そもそもクラスとは、データ(変数と定数)とそれを扱うための手続き(メソッド)を含むオブジェクトの設計図を指し、そのクラスに基づいて作り出される実体をインスタンスという。
クラス名 変数 = new クラス名( );
このように設計図であるクラスを実体化させたものを変数に代入することでインスタンスとして利用できる。
クラスの中のデータ、つまり宣言された変数をメンバ変数といい、クラス内のメソッドから自由にアクセスできる。ただ、メソッドの中にあるものは変数であっても、メソッド内で完結するためメンバ変数とは呼ばない。
インスタンスに生成に関係する機能にコンストラクタがあり、コンストラクタは生成された時点のインスタンスのデフォルト値を定めるものである。そのためコンストラクタの機能はインスタンスが生成された瞬間に実行されるメソッドの一種である。
using System;
namespace ConsoleApplication36
{
class Class2
{
public Class2() //Class2のコンストラクタ。コンストラクタの名前はクラス名が使われる。
{
Console.WriteLine(“public Class2()”);
}
public Class2(int x) //Class2のコンストラクタのオーバーロード。
//引数の異なる複数のコンストラクタを1つのクラスに持たせることができる。
{
Console.WriteLine(“public Class2(int x)called”);
}
}
class Class3
{
public Class3(int x, int y)//Class3のコンストラクタ
{
Console.WriteLine(“public Class3({0},{1})”,x,y);
}
}
class Class1
{
static void Main(string[] args)
{
Class2 t1 = newClass2(); //public Class2()と表示される
Class3 t2 = new Class3(1,2);//public Class3(1,2)と表示される
Class2 t3 = new Class2(1);//public Class2(int x)calledと表示される
}
}
Console.WriteLine( "{0}、{1}", "第1番目の引数", "第2番目の引数”);という書式をうまく使うと、
Console.WriteLine("{0} ({1}歳) さん、ようこそお越しくださいました。", name, age);
「tiyu (200歳) さん、ようこそお越しくださいました。」
のような 記述方法ができる。
よく広告メールで見かける仕組みである。
//親子オブジェクトのデータ取得
オブジェクトの親子データを取得方法を整理した。
子オブジェクトのスクリプトから親オブジェクトの情報を取得する場合:
using UnityEngine;
using System.Collections;
public class ChildScript : MonoBehaviour
{
private GameObject _parent;
void Start()
{
_parent = transform.root.gameObject; //Transform.rootで階層の一番上のTransformを取得
Debug.Log(“Parent:” + _parent.name);
}
}
親オブジェクトのスクリプトから子オブジェクトの情報を取得する場合:
using UnityEngine;
using System.Collections;
public class ParentScript : MonoBehaviour {
private GameObject _child;
void Start()
{
_child = transform.FindChild(“Child”).gameObject;
Debug.Log("Child is:" + _child.name);
}
}
コンポーネントの取得方法は少し特殊で、GetComponentInChildrenで子のゲームオブジェクトのコンポーネントを検索して取得、GetComponentInParentで親のゲームオブジェクトのコンポーネントを検索して1つ取得することができる。
//法線マップとハイトマップ
ポリゴンの数を気にしない場合は、多数の頂点を持った複雑なメッシュを使用して表面の詳細やテクスチャの凹凸をモデル化できるが、高負荷で一般的な手法ではなく、テクスチャマップが代わりに使われる。
この際に使われるテクスチャマップである法線マップは、モデルの表面の凹凸を疑似的に表現するのに使われるシンプルなもので、ポリゴンの幅によって光の反射具合を変えることで、曲面のように凹凸を疑似的に作ることができる。
ハイトマップは法線マップと同じく、単純なポリゴンのメッシュの上にあるディティールを表現するためのデータを含んでいるが、ハイトマップはシンプルな白黒のテクスチャで、各ピクセルが、表面上のそれぞれの地点がどの位盛り上がって見えるべきかを表しており、ピクセルの色が白に近いほど、そのエリアが高く盛り上がって見える。
https://docs.unity3d.com/ja/2018.4/Manual/StandardShaderMaterialParameterNormalMap.html
また、描画の負荷を削減する方法として、オクルージョンカリングという方法もある。
これは、あるオブジェクトが他のオブジェクトに隠されていて現在カメラに映らないときに、オブジェクトのレンダリングを無効にする機能である。
一般的に、3D コンピュータグラフィックスでは、カメラからもっとも遠いオブジェクトが最初に描かれ、段々近いオブジェクトへと描画の順番が移るからである(overdrawと呼ばれるもの)。
オクルージョンカリングに似たものとして、フラスタムカリングがあるが、フラスタムカリングの方は、「カメラの表示領域外」にあるオブジェクトの描画を無効にする機能で、カメラの視界から隠されたものについては描画を行うので区別して考える。
オクルージョンカリングの他にも、行って距離より離れていたら描画されないGloba Fogや遠くのものの描画を簡素化するLOD(level of detail)などの手法で負荷の削減を行える。
また、描画対象として、リアルタイムの影の描画はハイコストになるのでなるべく避けるようにする。