浏览代码

Fixed Custom Processor Class Name Generation

/feature-create-processor-and-material-from-menu
Thomas ICHÉ 4 年前
当前提交
c144830c
共有 1 个文件被更改,包括 4 次插入7 次删除
  1. 11
      Editor/ImageSequencer/EditorTemplates/ImageSequencerCustomProcessorTemplateFactory.cs

11
Editor/ImageSequencer/EditorTemplates/ImageSequencerCustomProcessorTemplateFactory.cs


using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using UnityEditor.ProjectWindowCallback;
using UnityEngine;

StringBuilder sb_monoScript = new StringBuilder();
string friendlyName = ObjectNames.NicifyVariableName(name);
string className = name.Trim(
' ', '~', '`', '!', '@', '#', '$',
'%', '^', '&', '*', '(', ')', '-',
'+', '=', '=', '=', '{', '}',
'[', ']', ';', ':', '\'', '"',
'<', '>', '.', ',', '?'
);
string className = Regex.Replace(name, @"[^0-9a-zA-Z_]+", "");
Debug.Log(className);
sb_monoScript.Append(@"using System.Collections;
using System.Collections.Generic;
using UnityEditor;

正在加载...
取消
保存