api 文档生成工具
npm install apidoc -g
apidoc -i app/controllers/ -o apidoc/ -t mytemplate/
以上用法将会对app/controllders/下的所有文件生成 api 文档,输出目录为apidoc/, 使用mytemplate/下的模板。
| public class FBXMeshExtractor { | |
| private static string progressTitle = "Extracting Meshes"; | |
| private static string fbxExtension = ".fbx"; | |
| private static string objExtension = ".obj"; | |
| private static string targetExtension = ".asset"; | |
| [MenuItem("Assets/Extract Meshes", validate = true)] | |
| private static bool ExtractMeshesMenuItemValidate() { | |
| for (int i = 0; i < Selection.objects.Length; i++) { |
| using System; | |
| using System.Collections.Generic; | |
| using UnityEditor; | |
| public class CIUtility { | |
| private static string buildDir = "Build/CatsAndDogs"; | |
| public static void Build_iOS() { | |
| EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.iOS, BuildTarget.iOS); |
| /// <summary> | |
| /// Load png or jpg file. | |
| /// </summary> | |
| public static Texture2D LoadImage(string filePath) { | |
| if (!File.Exists(filePath)) { | |
| return null; | |
| } | |
| Texture2D tex = new Texture2D(1, 1); | |
| byte[] fileData = File.ReadAllBytes(filePath); | |
| tex.LoadImage(fileData); |
| using System.IO; | |
| using UnityEngine; | |
| using UnityEditor; | |
| public static class RenderTexture2PNGUtility { | |
| [MenuItem("Assets/RenderTexture2PNG", true)] | |
| private static bool RenderTexture2PNGValidation() { | |
| return Selection.activeObject is RenderTexture; | |
| } |
| using System.IO; | |
| using UnityEngine; | |
| using UnityEditor; | |
| public class TexturePackUtility : ScriptableObject { | |
| public Texture2D[] alphaTextures; | |
| public string outputPath = "Assets/Textures/Topography/Topography.png"; | |
| public Material material; | |
| public string vectorPrefix = "_Rect"; |
| // Closure | |
| (function() { | |
| /** | |
| * Decimal adjustment of a number. | |
| * | |
| * @param {String} type The type of adjustment. | |
| * @param {Number} value The number. | |
| * @param {Integer} exp The exponent (the 10 logarithm of the adjustment base). | |
| * @returns {Number} The adjusted value. | |
| */ |
变量名,多变量定义
var adminUser = 'fool';
var value = 27;
类名
function BankAccount() {
// codes
}