Skip to content

Commit

Permalink
add multiple Asset Type received error to Modifier.
Browse files Browse the repository at this point in the history
  • Loading branch information
sassembla committed Aug 21, 2016
1 parent 7dff08d commit 5f1a3a2
Showing 1 changed file with 6 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,19 @@ public void Setup (string nodeName, string nodeId, string connectionIdToNextNode
foreach (var inputSource in inputSources) {
var modifyTargetAssetPath = inputSource.importedPath;
var assumedType = TypeBinder.AssumeTypeOfAsset(modifyTargetAssetPath);

if (assumedType == null || assumedType == typeof(object)) {
continue;
}

if (first) {
first = false;
modifierType = assumedType.ToString();
continue;
}

if (modifierType != assumedType.ToString()) {
Debug.LogError("type mismatch found:" + assumedType + " 実行時、流れ込んでくる素材の中に不純物がふくまれているエラー");
return;
throw new NodeException("multiple Asset Type detected. consider reduce Asset Type number to only 1 by Filter. detected Asset Types is:" + modifierType + " , and " + assumedType.ToString(), nodeId);
}
}

Expand Down Expand Up @@ -270,23 +274,6 @@ public T FromJson<T> (string source) {
return JsonUtility.FromJson<T>(source);
}

/**
限定的なチェックが出来る。
・nodeに対応したファイルが存在するかどうか
のみだ。
それ以外の情報を得るには、
・setupで流れ込んでくるデータの情報が必須。
これはImporterと同じだね。
ファイル存在チェック以上のチェックは、SetupとかRunで行おう。
デフォルトプラットフォームとそれ以外とで、扱いが異ならないように、
・まずその他のプラットフォームのデータの有無を確認 -> この処理は汎用化しないと。
・なくても、デフォルトのものがあればそれを使う
という感じ。
*/
public static void ValidateModifiyOperationData (
string modifierNodeId,
string targetPlatform,
Expand Down

0 comments on commit 5f1a3a2

Please sign in to comment.