public void LogWarning (string warning, Object context= null);

描述

将导入警告记录到控制台。

将资源作为第二个参数进行传递,以在编辑器中将警告与资源关联起来。

另请参阅:Debug.LogWarning。

    // Compress all the imported audio files and
// report a warning when the importer sound is 2D.

class PreprocessAudioSettings extends AssetPostprocessor { function OnPreprocessAudio() { var importer : AudioImporter = assetImporter; importer.format = AudioImporterFormat.Compressed; if(!importer.threeD) LogWarning(assetPath + " is a 2D sound"); } }