您的位置:首页 > 移动开发 > Unity3D

UnityEngine API 大纲 (三)接口、枚举、属性

2018-02-27 23:42 886 查看
2018/3/7 更新

UnityEngine 命名空间下

Interface

Attributes

Enumerations
2D

动画相关枚举

全局设置相关

音频相关枚举

摄像机相关枚举

物理相关枚举

颜色相关枚举

设备相关

网络相关

粒子系统枚举

贴图相关枚举

视频相关

IMGUI相关枚举

文字相关

灯光与光照贴图

程序性xxx

LineRenderer & TrialRenderer

UGUI & Sprite

触摸屏

其他

Interface

ICanvasRaycastFilter

IExposedPropertyTable

ILogger

ILogHandler

ISerializationCallbackReceiver

Attributes

AddComponentMenu

AssemblysEditorAssembly

BeforeRenderOrder

ColorUsage

ContextMenu

ContentMenuItem

CreateAssetMenu

CustomGridBrush

Delayed

DisallowMultiple

ExecuteInEdit

GUITarget

Header

HelpURL

HideInInspector

ImageEffectAfterScale

ImageEffectAllowdInSceneView

ImageEffectOpaque

ImageEffectTransformsToLDR

Multiline

PreferBinarySerialization

Property

Range

RequireComponent

RPC

RuntimeInitializeOnLoadMethod

SelectionBase

SerializeField

ShadredBetweenAnimators

Space

TextArea

Tooltip

UnityAPICompatibilityVersion

Enumerations

2D

EffectorForceMode2D (The mode used to apply Effector2D forces.)

EffectorSlection2D

动画相关枚举

AnimationBlendMode

AnimationCullingType

AnimatorControllerParameterType

AnimatorCullingMode

AnimatorRecorderMode

AnimatorUpdateMode

AvatarIKGoal

AvatarIKHint

AvatarMaskBodyPart

AvatarTarget

BlendWeights (How many bones affect each vertex. See Also: QualitySettings.blendWeights.)

HumanBodyBones(人类骨骼)

PlayMode(Animation.Play停止某个层/所有层的动画)

QueueMode(Used by Animation.Play function.CompleteOthers、PlayNow)

WrapMode(动画片段或动画曲线的循环模式)

SkinQuality(一个顶点最多受到几个骨骼的影响SkinnedMeshRRenderer.quality)

全局设置相关

AnisotropicFiltering(QualitySettings.anisotropicFiltering.)

public enum AnisotropicFiltering
{
Disable,
Enable,
ForceEnable
}


ApplicationInstallMode(应用程序通过什么方式安装)

using System;
namespace UnityEngine
{
public enum ApplicationInstallMode
{
Unknown,
Store,
DeveloperBuild,
Adhoc,
Enterprise,
Editor
}
}


ApplicationSandboxType

public enum ApplicationSandboxType
{
Unknown,
NotSandboxed,
Sandboxed,      //Application is running in a sandbox
SandboxBroken
}


FogMode

(RenderSettings.fogMode, Lighting Window.)

public enum FogMode
{
Linear = 1,
Exponential,
ExponentialSquared
}


ThreadPriority(线程优先级,Application.backgroundLoadingPriority)

SystemLanguage(系统语言)

IMECompositionMode(应该是指输入法 Auto、On、Off)

ShadowmaskMode

(QualitySettings.ShadowmaskMode和QualitySettings.shadowDistance)

ShadowProjection (QualitySettings)

ShadowQuality(QualitySettings.shadows和Light.shadows)

ShadowResolution(QualitySettings.shadowResolution…)

RenderingPath(摄像机的渲染路径)(重点)

LocationServiceStatus(描述定位服务状态 Stopped、Initializing、Running、Failed)

OperatingSystemFamily(SystemInfo.operatingSystemFamily操作系统)

UserAuthorization (Constants to pass to Application.RequestUserAuthorization.请求授权)

StackTraceLogType (Stack trace logging options.See Also: Application.stackTraceLogType.)

音频相关枚举

AudioClipLoadType

AudioCompressiongFormat

AudioDataLoadState

AudioReverbPreset

AudioRolloffMode

AudioSourceCurveType

AudioSpeakerMode

AudioType

AudioVelocityUpdateMode

摄像机相关枚举

CameraClearFlags

(Camera.clearFlags,determining what to clear when rendering a Camera.)

public enum CameraClearFlags
{
Skybox = 1,
Color,
SolidColor = 2,
Depth,
Nothing
}


CameraType

(Describes different types of camera.)

namespace UnityEngine
{
[Flags]
public enum CameraType
{
Game = 1,       //普通的游戏用的相机
SceneView = 2,  //Editor用于渲染scene view的相机
Preview = 4,    //Editor用于渲染preview的相机
VR = 8,         //Editor用于渲染VR
Reflection = 16 //用于渲染Reflection Probes的相机
}
}


StereoTargetEyeMask (Enum values for the Camera’s targetEye property.)

物理相关枚举

CapsuleDirection2D

ClusterInputType

CollisionDetectionMode

CollisionDectectionMode2D

CollisionFlags

ConfigurableJointMotion

RotationDriveMode(控制ConfigurableJoint的旋转方式)

ForceMode

ForceMode2D

JointDriveMode

JointLimitState2D

JointProjectionMode

PhysicMaterialCombine(物理材质的合并)

RigidbodyConstraints

RigidbodyConstraints2D

RigidbodyInterpolation

RigidbodyInterpolation2D

RigidbodySleepMode2D

RigidbodyType2D

WindZoneMode

QueryTriggerInteraction(Overrides the global Physics.queriesHitTriggers.)

颜色相关枚举

ColorGamut (颜色范围)(sRGB、Rec709、Rec2020….)

ColorSpace (颜色空间) (用于PlayerSettings.colorSpace AtlasSettings.colorSpace)

public enum ColorSpace
{
Uninitialized = -1,
Gamma,
Linear
}


ComputeBufferType(貌似用于HLSL shader、compute shader)

ConnectionTesterStatus(网络)

CursorLockMode

public enum CursorLockMode
{
None,       //未定义其行为
Locked,     //游戏窗口中心
Confined    //限制在窗口内
}


CursorMode

public enum CursorMode
{
Auto,
ForceSoftware
}


GradientMode(选择如何评估梯度 Blend、Fixed)

设备相关

BatteryStatus(电池)

(Enumeration for SystemInfo.batteryStatus which represents the current status of the device’s battery.)

public enum BatteryStatus
{
Unknown,
Charging,
Discharging,
NotCharging,
Full
}


DeviceOrientation(设备朝向)

DeviceType(设备类型)

网络相关

NetworkConnectionError

NetworkDisconnection

NetworkLigLevel

NetworkPeerType

NetworkReachability

NetworkStateSynchronization

MasterServerEvent

RPCMode

粒子系统枚举

ParticleRenderMode

ParticleSystemAnimationMode

ParticleSystemAnimationType

ParticleSystemCollisionMode

ParticleSystemCollisionQuality

ParticleSystemCollisionType

ParticleSystemCurveMode

ParticleSystemCustomData

ParticleSystemCustomDataMode

…………..还有一堆的粒子系统相关枚举

贴图相关枚举

CubemapFace(立方体贴图的面,用于 Cubemap.GetPixel 和 Cubemap.SetPixel)

CustomRenderTextureInitializationSource

(指定custom RenderTextrue的初始化)

public enum CustomRenderTextureInitializationSource
{
TextureAndColor,    //用一个Texture乘以一个颜色来初始化
Material            //用一个Material来初始化
}


CustomRenderTextureUpdateMode

(Frequency of update or initialization of a Custom Render Texture.)

(custom RenderTexture的初始化或更新的频率)

public enum CustomRenderTextureUpdateMode
{
OnLoad,     //初始化/更新只在加载时触发一次,然后之后可以用脚本触发
Realtime,   //初始化/更新每帧都发生
OnDemand    //只在脚本触发时初始化/更新
}


CustomRenderTextureUpdateZoneSpace

(Space in which coordinates are provided for Update Zones.)

public enum CustomRenderTextureUpdateZoneSpace
{
Normalized, //左上角(0,0),右下角(1,1)
Pixel       //左上角(0,0),右下角(width,height)
}


DepthTextureMode

DetailRenderMode

FilterMode

(Filtering mode for textures. Corresponds to the settings in a texture inspector.)(Texture.filterMode)

TextureCompressionQuality

TextureFormat

TextureWrapMode

RenderTextureCreationFlags

RenderTextureFormat

RenderTextureMemoryless

RenderTextureReadWrite

MaterialGlobalIlluminationFlags

NPOTSupport(对NPOT贴图的支持程度)

视频相关

FullScreenMovieControlMode(视频)

FullScreenMovieScalingMode

IMGUI相关枚举

EventModifiers

(Types of modifier key that can be active during a keystroke event.)

(See also : Event GUI Scripting Guide)

EventType(IMGUI事件类型)

FocusType

(Used by GUIUtility.GetControlID to inform the IMGUI system if a given control can get keyboard focus. This allows the IMGUI system to give focus appropriately when a user presses tab for cycling between controls.)

ImagePosition(GUIStyle)

ScaleMode(GUI.DrawTexture)

文字相关

FontStyle

(Font Style applied to GUI Texts, Text Meshes or GUIStyles.)

(Normal、Bold、Italic、BoldAndItalic)

(不仅仅用于IMGUI)

HorizontalWrapMode(文字超出边界之后的处理)(不仅IMGUI)

灯光与光照贴图

LightmapBakeType()

LightmapsMode

LightmapsModeLegacy

LightRenderMode(How the light is rendererd. Auto、ForcePixel、ForceVertex)

LightShadows()

LightType

MixedLightingMode(灯光)

程序性xxx

ProceduralCacheSize

ProceduralLoadingBehaviour

ProceduralOutputType

ProceduralProcessorUsage

ProceduralPropertyType

LineRenderer & TrialRenderer

LineAlignment

(Control the direction lines face, when using the LineRenderer or TrailRenderer. View、Local)

LineTextureMode(Choose how textures are applied to Lines and Trails.)

UGUI & Sprite

SpriteAlignment

SpriteDrawMode

SpriteMaskInteraction

SpriteMeshType

SpritePackingMode

SpritePackingRotation

SpriteTileMode

TextAlignment

TextAnchor

TextClipping

RenderMode(Canvas的渲染模式)

AdditionalCavasShaderChannels(貌似是UI)

using System;

namespace UnityEngine
{
[Flags]
public enum AdditionalCanvasShaderChannels
{
None = 0,
TexCoord1 = 1,
TexCoord2 = 2,
TexCoord3 = 4,
Normal = 8,
Tangent = 16
}
}


VerticalWrapMode(Wrapping modes for text that reaches the vertical boundary.)

触摸屏

TouchPhase(手指触摸状态)

TouchScreenKeyboardType(触摸屏键盘类型)

TouchType(触摸类型:direct、indirect、stylus手写笔)

其他

AndroidActivityIndicatorStyle

DrivenTransformProperties

DurationUnit

FFTWindow (频谱分析窗口类型,使用此功能可以减少跨频段的信号泄漏)

HideFlags

(Bit mask that controls object destruction, saving and visibility in inspectors.)

(不太明白,但应该是个挺有意思的东西)

KeyCode(键盘字母)

LODFadeMode

(The LOD fade modes. Modes other than LODFadeMode.None will result in Unity calculating a blend factor for blending/interpolating between two neighbouring LODs and pass it to your shader.)

LogType(Error、Assert、Warning、Log、Exception)

MeshColliderCookingOptions

MeshTopology

MotionVectorGenerationMode (???)

PrimitiveType(内置的几何体)

RuntimeInitializeLoadType(和 [RuntimeInitializeOnLoadMethod] 有关、场景加载细节)

RuntimePlatform(由Application.platform返回)(SystemInfo.xx)

Note: The difference between using RuntimePlatform and Platform dependent Compilation is that using RuntimePlatform is evaluated at runtime while Platform dependent Compilation is evaluated at compile time. So if you can use platform dependent compilation, don’t hesitate to use it. In most cases, you can get the same functionality using both, and using the defines will produce smaller and faster code, as you don’t need to check at runtime. There are some cases where RuntimePlatform is needed at runtime.

ScreenOrientation(屏幕朝向 还有个设备朝向 DeviceOrientation)

SendMessageOptions(发送消息)

Space(World、Self)

TerrianChangedFlags

TizenActivityIndicatorStyle(游戏加载时显示的提示,Tizen是特殊的操作系统)

TransparencySortMode

VRTextureUsage
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: