随笔分类 - C#
摘要:EditorUtility.DisplayProgressBar("Modify Prefab", "Please wait...", 0); string[] ids = AssetDatabase.FindAssets("t:Prefab", new string[] { "Assets/Res
阅读全文
摘要:方法1: 使用Application类下的CaptureScreenshot方法 void CaptureScreen() { Application.CaptureScreenshot("Screenshot.png", 0); } 这个方法,截取的是某一帧时整个游戏的画面,或者说是全屏截图。 不
阅读全文
摘要:iTween oncomplete回调不工作 iTween.MoveTo (newBoom, iTween.Hash "y", 100f, "speed",Boomspeed, "EaseType",BoomeaseType, "LoopType",BoomloopType, "oncomplete
阅读全文
摘要:Json数据如下: { "data": [{ "id": 141, "layoutLabel": "Sameer", "hasCustomProb": 1 }, { "id": 214, "layoutLabel": "abc", "hasCustomProb": 0 } ], "status":
阅读全文
摘要:错误 CS8107 C# 7.0 中不支持功能“xxxxxx”。请使用 7.1 或更高的语言版本。 解决方法:项目右键属性 —> 生成 —> 找到最下面的高级按钮,点击高级按钮 —> 常规 —> 语言版本 —> 选择 C#最新次要版本,或者比当前版本更高的版本即可,点击确定,然后保存即可。 Refr
阅读全文
摘要:public class DragRigidbody : MonoBehaviour { const float k_Spring = 50.0f; const float k_Damper = 5.0f; const float k_Drag = 10.0f; const float k_Angu
阅读全文
摘要:using System; using System.Collections; using UnityEngine; // This class just convert from CharacterMotor.js to C# [RequireComponent(typeof(CharacterC
阅读全文
摘要:SharpZipLib: recursively zip/unzip directory structure 001 // Project: Salient 002 // http://salient.codeplex.com 003 // 004 // Copyright 2010, Sky Sa
阅读全文
摘要:Last evening I came up with a requirement to drag a folder path into a TextBox in one of my Windows form applications. So I just want to share it with you all through a simple example. Drag-and-drop o...
阅读全文
摘要:This is a list of the instructions in the instruction set of the Common Intermediate Language bytecode. Opcode Instruction Description Type of instruction 0x58 add Add two values, returning a ...
阅读全文
摘要:直接获取TerrainData进行修改即可 using System.Collections; using UnityEngine; using UnityEditor; public class DynamicCreateTerrain : MonoBehaviour { public TerrainData terrainData; private float[,] heig...
阅读全文
摘要:String.Format 方法的几种定义: String.Format (String, Object) 将指定的 String 中的格式项替换为指定的 Object 实例的值的文本等效项。String.Format (String, Object[]) 将指定 String 中的格式项替换为指定数组中相应 Object 实例的值的文本等效项。String.Format (IFormatPro...
阅读全文