Unity 6.3
0 онлайн 13 гостей 3 в системе
Вход

AssetPostprocessor.assetPath

Declaration

public string assetPath;

Описание

Имя пути импортируемого ассета.

using UnityEngine;
using UnityEditor;

// Automatically sets Textures settings upon first import and prints the // path from where is being imported

class CustomImportSettings : AssetPostprocessor { // Increment the version number, when the AssetPostprocessors code/behavior is changed static readonly uint k_Version = 0; public override uint GetVersion() { return k_Version; }

void OnPreprocessTexture() { Debug.Log("Importing texture to: " + assetPath); TextureImporter importer = (TextureImporter)assetImporter; importer.textureFormat = TextureImporterFormat.ARGB32; importer.isReadable = true; importer.mipmapEnabled = false; } }