Skip to content
mw

mw

mw Namespace

Table of contents

Enumerations

AdsState
Advertising status, the advertising status that may be returned when calling the show method
AdsType
Ads type
AnimSlot
Animation Slot
AnimationBlendMode
Animation Curve
AnimationMode
Animation mode
AppearanceType
Image type
AssetIconSize
Resolution of icon
AssetType
Asset type
AttenuationDistanceModel
Sound attenuation function model
AttenuationShape
Sound attenuation shape
BasicStanceType
Basic posture style
BodyPartTypeV1
V1 character location
ButtonClickMethod
Button click response rules
ButtonPressMethod
Button press response rules
ButtonTouchMethod
Button Touch Response Rules
CameraControlType
Camera control mode
CameraPositionMode
Camera position mode
CameraPreset
Camera mode
CameraProjectionMode
Camera lens mode
CameraRotationMode
Camera rotation mode
CameraSwitchBlendFunction
Mixed function used when switching camera
CharacterFeatureType
Enumeration of Morph and Bone dressing items for appearance attributes
CharacterStateType
Character Status
CharacterTemplate
Character body type
CharacterType
Image type
CheckBoxState
Select Rule
CollisionStatus
Collision property Status
CollisionType
Collision type
CustomShapeType
Shape type of collision body
DataStorageResultCode
Data storage return code
DispatchEventResult
The result of the event being sent
DragPivot
Dragged anchor
EdActorFlag
Actor's state markers in the editor
EventType
:-----
ExpressionType
Emoji type
FaceStyle
Basic face shape of character
FogPreset
Environment fog preset enumeration
ForceType
Force application type of Force Volume
GizmoCoordinateType
Gizmo coordinate axis type
GizmoModeType
Gizmo mode
GizmoScaleType
Gizmo Space
GizmoSocketType
Gizmo Space
GizmoSpaceType
Gizmo Space
GraphicsLevel
GravityMode
Gravity mode
HideInEditorState
Should I hide it in the editor
HotWeaponAimMode
Hot weapon aiming mode
HotWeaponFireMode
Hot weapon firing mode
HotWeaponState
Hot Weapon status
HttpRequestType
Enumeration of HTTP request types developed for users
HttpRequestURL
The URL enumeration developed for users needs to correspond to the enumeration in the C++layer
HumanoidSlotType
Type of slot for humanoid characters
IKPart
IK anchor type
ImpulseForceType
Type of impulse force
ImpulseType
Application mode of impulse
InitialOscillatorOffset
Define how to start (from zero or from random values)
InputTextLimit
Input box restrictions
InsertNewLineType
Input box enter key function
Keys
Key value of keys
LanguageCodeType
Localized language for games
LanguageType
Game language
MaskButtonType
Mask type
MaskType
New Mask Types
MenuPlacement
Menu call out position enumeration
MessageState
Status of sending messages
MessageType
Type of message sent
MotionAxis
Motion coordinate system
MotionMode
Sport mode
MouseCursor
Cursor Type
MouseLockMode
Mouse Lock mode
MoveControlMode
Mobile control mode
MoveFacingDirection
Facing the direction during exercise
MovementDirection
Positive direction of motion
MovementMode
Character Status
NavModifierType
The type of navigation dynamic decoration area. Different types have different costs in navigation calculation, which affects the navigation result
NetStatus
Sync status
NonHumanoidSlotType
Non human character slot type
ObjectTypeQuery
Collision detect channel
Orientation
Scroll box Type
OscillatorWaveform
Oscillator waveform
ParticleEmitterShape
Effect Shape Enumeration
ParticleEmitterShapeStyle
Special effect emission type
PlayStatus
Frame animation playback rules
PostProcessPreset
Preprocessing preset enumeration
ProgressBarFillType
Progress Bar filling rules
ProjectileMovementStatus
Throwing object movement status
PropertyStatus
Property Status
RuntimePlatform
Runtime platform
ScrollBarDefaultLocation
Default position of scrollbar
SelectInfo
List View Select Source Information
SelectionMode
List View Select mode
SkyPreset
Sky Box preset enumeration
SlateBrushDrawType
Picture brush drawing mode
SlateBrushTileType
Image Brush Fill mode
SlateColorStylingMode
UI Color Application mode
SlateVisibility
UI Node Display Rules
SlideMethod
Progress Bar sliding mode
SomatotypeV1
V1 character body type
SomatotypeV2
Character body type
SoundPlayState
Sound playback status
StanceBlendMode
Attitude Hybrid Mode
TeleportStatus
transfer status
TextCommit
Enter the submission mode
TextJustify
Text alignment rules
TextVerticalJustify
Text Arrange vertical align Rule
TextureFormat
TouchInputType
Touch type
TriggerShapeType
Collision shape
UIConstraintHorizontal
Alignment strategy horizontal rules
UIConstraintVertical
Align Policy vertical Rule
UIFontGlyph
Font type
UIHorizontalCollation
Auto layout Child layout sort - horizontal sort
UIHugContentHorizontally
Automatic Container Layout Horizontal Adaptation Rules
UIHugContentVertically
Automatic layout Container vertical fit rule
UILayoutPacket
Auto layout Layout Rules - Arrangement Rules
UILayoutType
Automatic layout Layout Rules - Container Type
UIScrollBoxAnimationType
Scroll box animation Type
UITextHorizontalLayout
Text box rules display rule restrictions
UIVerticalCollation
Automatic layout sub item layout sorting - vertical sorting
VehicleDriveMode4WNew
Four wheel vehicle drive mode
VehicleWheelPosition4WNew
Four wheel vehicle wheel position
WaterPreset
Preset enumeration of water bodies
WidgetGeometryMode
UI Shape Enumeration
WidgetSpaceMode
UI space position enumeration
consumeKeyStatus
Return status information of key deduction order for major members

Classes

AccountService
User Account Information Management Service
Action
agent
Action1
Proxy for a parameter
Action2
Proxy with two parameters
Action3
Proxy with three parameters
AdsButton
Advertisement button, please note that it is not allowed to be obscured
AdsService
Ads service
AdvancedVehicle
Four-wheel vehicle
AnalyticsService
Analysis Services
Animation
animation
AssetIconData
Asset icon information
AssetUtil
Asset management tools
AvatarSettings
Control the opening and closing of some optimization items
BlockingVolume
Blocking area
Button
Button
ButtonStyle
Button Widget Style Type
Camera
Camera
Canvas
Container
Character
Character
CharacterDecoration
Character pendant slot
CharacterDescription
Humanoid appearance configuration
CharacterEvent
Character input event
ChatBubble
Chatting with bubbles above the head
ChatService
Chat service
Checkbox
Checkbox
CheckboxStyle
Checkbox Widget Style Type
ColorPick
palette
ConvertScreenResult
Screen coordinate conversion result
DataFile
Data file retrieval tool
DataStorage
data storage
DebugService
Debug test run service
DebugUtil
Game performance data, auxiliary debugging and performance optimization
Delegate
entrust
DragDropOperation
UI Drag and drop event
DragDropPayLoad
Drag and drop event data transfer class
DrawCanvas
UI canvas
DrawDataBase
Basic parameters for graphic drawing
Dropdown
Dropdown
DropdownStyle
Dropdown Widget Style Type
Effect
Effect
EffectService
Effect Manager
EnvironmentSettings
Environment settings
Event
event
EventListener
Event Listener
EventReply
Event response
FlipBook
Frame animation control
Fog
Environmental fog
ForceVolume
Physical force region
GameApplication
The base class of the main script
GameObject
Base class of all entities in the scene
Geometry
Geometric coordinate information
GraphicsSettings
Image graphics quality settings
HitResult
The hit result contains information about a hit of the track, such as the impact point and the surface normal of the point.
HotWeapon
Hot Weapon
HotWeaponAccuracyOfFireComponent
Hot Weapon shoot precision component
HotWeaponAimComponent
The hot weapon aiming component will bring the perspective of the gun wielding character closer in the aiming state
HotWeaponFireComponent
Thermal weapon firing component, responsible for maintaining the main parameters and core logic of thermal weapon firing
HotWeaponLoadComponent
Hot Weapon loading component is responsible for maintaining relevant parameters and logic of Hot Weapon loading action
HotWeaponRecoilForceComponent
Thermal weapon recoil component, used to control the shaking (automatically restored) and offset (not automatically restored) of the character's perspective during launch
HotWeaponReloadComponent
Hot Weapon reload component is responsible for maintaining the relevant parameters and logic of Hot Weapon reload action
IKAnchor
IK anchor point
Image
Image
ImageInfo
Image information
Impulse
Impulse
InputBox
Input box
InputUtil
Input Event Tool
IntegratedMover
Motor components
Interactor
Interactive objects, please ensure that animation asset have been loaded before interaction, otherwise position errors or other unexpected performance may result
JoystickBindKeyType
Joystick key binding
JoystickStyleDesigner
Joystick information
KeyEvent
Key events
LanguageUtil
Multilingual tools
Lighting
illumination
LinearColor
r, g, b The effective range of color values is 0.0<=value<=1.0
ListItemStyle
Background image style type
ListView
List View
ListViewItemDataBase
List View Node Data Base Class
LocaleUtil
localization application
Margin
Basic margin, providing numerical modification in 4 directions
Mask
Mask Container
MaskButton
Mask button
MaterialInstance
Material instance class
MaterialSlot
Model slot, perform material related operations
MathUtil
Mathematical Library Tools
Matrix3x3
Three-dimensional matrix
Matrix4x4
Four-dimensional matrix
MenuAnchor
Menu Anchor Point
MenuItemInfo
Menu item node information
Model
Physical Simulation and material Settings
MulticastDelegate
Multicast delegate API
MulticastGameObjectDelegate
Broadcast agency
NavModifierVolume
Navigation dynamic decoration area
Navigation
Navigation
ObjectLauncher
Projectile launcher
ParticleEmitter
Particle effect
Pawn
As the base class of Player character and non object Player character, Pawn is a game object that can be control through Player controller or logical script.
PhysicsService
Collision group
PhysicsThruster
propeller
Player
Role Manager
PlayerState
PlayerState base class
PointLight
Point source
PointerEvent
Classes that transmit mobile touch, mouse, and keyboard information when clicking or sliding
PostProcess
Post-Processing
PostProcessConfig
Post processing object attribute configuration
ProgressBar
Progress Bar
ProjectileInst
Dedicated instance object for projectile launcher
ProjectileMovement
Projectile movement function class
PurchaseService
In app purchase service
Quaternion
Quaternion
QueryUtil
Radiographic detect tools
RigidConstraint
Physical link component
RoomService
Game Service and related APIs such as player information, data, avatars, etc.
RoomSettings
Room Settings
Rotation
Euler angle
RouteService
Game Manager
ScreenUtil
Screen viewport Tools
Script
Base class of script
ScriptingSettings
Global script configuration information
ScrollBox
Sliding frame
ScrollbarStyle
Scroll bar style type
SelectionUtil
Stroke drawing tool
Skybox
Sky Box
SlateColor
Color management
Sound
Sound effects
SoundService
Sound Manager
SpringArm
Spring arm
StaleButton
Text button
Stance
Basic stance
StringUtil
String Tool
SubStance
Second level posture
SwimmingVolume
:-----
SystemUtil
Status information acquisition tool
TabGroup
tabbed groups
TeleportService
Multiple scene and delivery services
TextBlock
Text
TextStyle
Text Style Type
TileView
tile view
TimeUtil
Time tool
TouchPad
Camera sliding area
Transform
3D transformation
TreeView
Tree View
TreeViewItemDataBase
Tree View Node Data Base Class
Trigger
Trigger
Tween
Animation (from in between) is a concept that allows you to change property of objects in a smooth way.
TweenGroup
Gap group, used to simultaneously control multiple gap objects
TweenSequence
Sequence utility class, mainly used to obtain consecutive IDs
TweenUtil
Animation (from in between) is a concept that allows you to change property of objects in a smooth way.
UIChildCollation
Container automatic layout sub item sorting rules
UIConstraintAnchors
Node alignment rules
UIDrawCustomVertex
Customize Drawing Entity Data
UIFontInfo
font information
UIHugContent
UILayout
Container Automatic layout Rules
UIObject
UI object
UIScript
UI Driver script base class for
UIService
UI Management
UITransform
Transform
UIWidget
World UI
UserWidget
Custom Control
Vector
Three-dimensional vector
Vector2
Two-dimensional vector
Vector4
Homogeneous vector
VirtualJoystickPanel
Joystick
WaterVolume
Water Volume
Widget
Base class of widget
WindowUtil
Window setting tool.
colorSequencePoint
Node of special effect color value curve
numberSequencePoint
Special effects scalar value curve node
vectorSequencePoint
Effect vector value curve node

Interfaces

CameraShakeInfo
Shake data
CollisionQueryParams
Space query collision parameters
DataStorageResult
Data storage return value
GameObjectInfo
Constructing information about objects
ProjectileMovementConfig
Type of projectile configuration
RenderQueryParams
Spatial query rendering parameters
RequestInit
Object of HTTP request information
Response
Object of HTTP response information
RoomInfo
Room information of Player
TeleportOptions
Additional information that can be provided during transmission
TeleportResult
The result of transmitting the request
TypeName
Class definition, using this can save the tedious type declaration of class parameters, such as fun<T>(c: {new(): T}), which can be written as fun<T>(c: Class<T>)

Type Aliases

BoolCallback: (value: boolean) => void
Return the callback of Bool
BoolResponse: (success: boolean) => void
Return boolean callback
BroadcastMessageResult: Object
The result of sending a message
ChatEvent: (jsonData: string) => void
Received MGS event call
CustomPropertyType: number boolean string Vector2 Vector Vector4 Rotation LinearColor
Custom attribute type
DelegateFuncType: (...arg: unknown[]) => unknown other
Proxy callback function signature
DownloadDataResponse: () => void
Download callback of character appearance, no parameters
EmptyCallback: () => void
Empty callback function type
HttpResponse: (result: boolean, content: string, responseCode: number) => void
The callback message format for HTTP requests
LoadAppearanceDataAllCompletedCallback: () => void
Callback after character editor data loading
LocalUGCGameInfo: Object
Local engineering information. If the project has released games in UGC consumption mode, the gameId is not empty.
MGSEvent: (jsonData: string) => void
Received MGS event call
MGSResponse: (isSuccess: boolean, jsonData: string) => void
Received app replies
OnDescriptionChange: (operationCode: number, index: number, value: unknown) => void
Commissioned changes in appearance loading details
OnDescriptionComplete: (character: Character) => void
Appearance loading completion delegate
OnKeyConsume: (player: Player, orderId: string, boxId: string, amount: number, confirmOrder: (bReceived: boolean) => void) => void
Message format for receiving shipping notifications on the deduction server for major member keys
OnMovementModeChange: (mode: MovementMode) => void
Mobile status switching delegate
OnOrderDelivered: (playerId: number, orderId: string, commodityId: string, amount: number, confirmOrder: (bReceived: boolean, message?: string) => void) => void
Message format for receiving shipping notifications on the server
OnViewLayoutSwitched: (newState: number) => void
Message format for switching window display modes in app
OnViewRefreshed: () => void
Message format for window refresh in app
PublishedUGCGameInfo: Object
Successfully released UGC consumer game information
RedeemResponse: Object
status : Exchange status.
SetAppearanceDataCallback: (APIName: string) => void
Set callback for data editing completion
StringCallback: (str: string) => void
Return callback for String
StringResponse: (dataString: string) => void
Return string callback
TabGroupOnClickedProps: Object
Tab group - click event type
TeamMatchFailureInfo: Object
Team jumping game request failed callback
TeleportData: string string[] Record<string, any> Record<string, any>[]
Types of data that can be carried during transmission
TransactionType: (isSuccess: boolean, content: string) => void
Mall communication callback message format
TweenEasingFunction: (amount: number) => number
Definition of Types for Slow Functions
TweenInterpolationFunction: (v: number[], k: number) => number
Definition of interpolation function types
TweenUnknownProps: Record<string, any>
The user can freely expand the definition of the supplementary property
UGCTemplateInfo: Object
UGC Template Information
UploadDataResponse: (success: boolean) => void
Download callback message format for character image
VehicleGearDataNew: Object
Four wheel vehicle gear attributes
VehicleWheelDataNew: Object
Four Wheel Vehicle Wheel property
VoidResponse: () => void
Return a callback without parameters
downloadCharacterDataStringCallback: (dataString: string) => void
Download platform data callback
keyUsageInfo: Object
Large member consumption key order. OrderId: Order ID, boxId: Treasure Box ID, number: Quantity of Treasure Boxes Purchased, shipTime: Shipping Time, Millisecond Timestamp
maskWordCheckResult: Object
Masked word detect result
onAppearanceDataChanged: (GUID: string) => void
Character GUID switch success callback

Variables

Client: FunctionOption other
client
Multicast: FunctionOption other
Multicast
Result: FunctionOption other
Implementing RPC function return values in conjunction with Client Server
Server: FunctionOption other
Server side
UILayerBottom: 1
The bottom level zOrder starts at 100000
UILayerDialog: 5
Dialogue zOrder starts at 500000
UILayerError: 7
Error This layer cannot be used. If you need to add a layer, you can use addUILayerMap zOrder from 700000
UILayerMiddle: 2
Mid level zOrder starts at 200000
UILayerOwn: 3
Exclusive layer (calling this layer will automatically hide the Bottom and Middle layers) zOrder starts at 300000
UILayerScene: 0
Scene zOrder starts at 0
UILayerSystem: 6
System zOrder started at 600000
UILayerTop: 4
Top level zOrder starts at 400000
Unreliable: FunctionOption other
Unreliable RPC

Functions

Component<T: extends typeof Script>(component: T): T: extends typeof Script other
Declare the class as mwclass
Property(option?): (target: object, key: string) => void other
Attribute supports synchronization
RemoteFunction(...options): (target: unknown, propertyKey: string, descriptor: PropertyDescriptor) => void other
Function supports Rpc calling
Serializable<T: extends ConstructorType>(type: T): T: extends ConstructorType other
Type support replicated
absoluteToLocal(geometry: Geometry, absolutePosition: Vector2): Vector2 other
Convert absolute coordinates to relative coordinates
absoluteToViewport(absoluteDesktopPosition: Vector2, outPixelPosition: Vector2, outViewportPosition: Vector2): void other
Convert the absolute coordinates of geometric shapes in desktop space to local viewport coordinates
asyncCreateUI<T: extends UIScript<T>>(UIPrefabName: string, panelClass: () => T): Promise<T: extends UIScript<T>> other
Asynchronous create UI
asyncCreateUIByName(UIPath: string): Promise<UserWidget> other
Asynchronous create UI, null if failed
cancelDragDrop(): void other
Interrupt all DragDrop operations
createUI<T: extends UIScript<T>>(UIPrefabName: string, panelClass: () => T): T: extends UIScript<T> other
Create UIPrefab
createUIByName(UIPrefabName: string): UserWidget other
Create UIPrefab
createUIByPath(UIPath: string): UserWidget other
Create UIPrefab
createUIOnlyClass<T: extends UIScript<T>>(panelClass: () => T): T: extends UIScript<T> other
Create an empty UI
endDragDrop(InReply: EventReply): void other
Interrupt a drag event and pass in an action event
fetch(url: string, init?: RequestInit): Promise<Response> other
HTTP request
findUIScript(UI: Widget): UIScript other
Get UI script
generalHttpRequest(response: HttpResponse, requestUrl: HttpRequestURL, param: string, jsonContent: any, requestType: HttpRequestType): boolean other
Universal HTTP Request
getAbsoluteSize(geometry: Geometry): Vector2 other
Return the size of geometric shapes in absolute space
getAssetIconDataByAssetID(asset: string, size?: AssetIconSize): AssetIconData other
Get ICON information of asset
getCurrentMousePosition(): Vector2 other
Get the absolute position of the current mouse
getDragDroppingContent(): DragDropOperation other
Get the current DragDrop event
getLastMousePosition(): Vector2 other
Get the absolute position of the last mouse
getLocalSize(geometry: Geometry): Vector2 other
Return the size of geometric shapes in local space
getLocalTopLeft(geometry: Geometry): Vector2 other
Return the local top/left side of geometric shapes in local space
getMousePositionOnPlatform(): Vector2 other
Get the mouse cursor position of the platform. This is the absolute desktop position of the mouse.
getMousePositionOnViewport(): Vector2 other
Retrieve the position of the platform's mouse cursor in the local space of the viewport control.
getPlayerScreenWidgetGeometry(player: Player): Geometry other
Gets the geometry of all widget that are added to the "player screen", including widget. You can use this geometric shape to convert controls between absolute and local space.
getResolutionChanged(Delegate: MulticastDelegate<(x: number, y: number) => void>): void other
Callback when resolution change
getUrlParameter(url: string, parameterName: string): string other
Get URL parameters
getViewportScale(): number other
Gets the current DPI Scale applied to the viewport and all widgets.
getViewportSize(): Vector2 other
Get the size of the game viewport.
getViewportWidgetGeometry(): Geometry other
Get the geometric shape of the control that contains all the controls added to the viewport. You can use this geometry to convert widget between absolute and local widget.
httpRequestTransmitData(response: HttpResponse, paramUrl: string, jsonContent: string, requestType: HttpRequestType): boolean other
Http request API
isDragDropping(): boolean other
Determine if there is currently a DragDrop event
isUnderLocation(geometry: Geometry, absolutePosition: Vector2): boolean other
Determine whether the given coordinates are in geometry
localToAbsolute(geometry: Geometry, localPosition: Vector2): Vector2 other
Convert local coordinates to absolute coordinates, which can be desktop space or window space, depending on the space where the root of the widget hierarchy is located.
localToViewport(geometry: Geometry, localPosition: Vector2, outPixelPosition: Vector2, outViewportPosition: Vector2): void other
Convert the local coordinates of the geometry to local viewport coordinates.
releaseAssetIconTextureFromCache(asset: string): void other
Try to mark the ICON graph of asset as waiting for release and waiting for release
screenToViewport(screenPosition: Vector2): Vector2 other
Converts the screen position (in pixels) to the local space of the viewport widget.
screenToWidgetAbsolute(screenPosition: Vector2, isIncludeWindowPosition?: boolean): Vector2 other
Converts the screen position (pixels) to absolute desktop program coordinates. If bIncludeWindowPosition is true, then this method will also remove the position of the game window (useful in window mode).
screenToWidgetLocal(geometry: Geometry, screenPosition: Vector2, isIncludeWindowPosition?: boolean): Vector2 other
Convert the screen position (in pixels) to the local space of a widget with a given geometric shape. If bIncludeWindowPosition is true, this method will also remove the position of the game window (useful in window mode).
setFocusToGameViewport(): void other
Set up follow game window
setInputModeGameAndUI(InWidgetToFocus?: Widget, InMouseLockMode?: MouseLockMode, hideCursorDuringCapture?: boolean): void other
Set an input mode that only allows the UI to respond to user input. If the UI does not handle it, Player input/Player controller will have a chance
setInputModeGameOnly(): void other
Set an input mode, allowing only Player input/Player controller to respond to user input
setInputModeUIOnly(InWidgetToFocus?: Widget, InMouseLockMode?: MouseLockMode): void other
Set the input mode that only allows the UI to respond to user input.
startRecord(screenX: number, screenY: number, screenW: number, screenH: number): string other
Screen recording
stopRecord(): void other
Stop screen recording
transformVectorAbsoluteToLocal(geometry: Geometry, absoluteVector: Vector2): Vector2 other
Convert vectors from absolute space to local space
transformVectorLocalToAbsolute(geometry: Geometry, localVector: Vector2): Vector2 other
Convert vectors from local space to absolute space
urlDecode(str: string): string other
URL decoding
urlEncode(str: string): string other
URL transcoding
vibrate(enable: boolean): void other
Vibration switch

Type Aliases

BoolCallback

Ƭ BoolCallback: (value: boolean) => void

Type declaration

• (value): void

Return the callback of Bool

Parameters
valueboolean
Returns

void


BoolResponse

Ƭ BoolResponse: (success: boolean) => void

Type declaration

• (success): void

Return boolean callback

Parameters
successboolean
Returns

void


BroadcastMessageResult

Ƭ BroadcastMessageResult: Object

The result of sending a message

Type declaration

code MessageStateStatus of sending messages
message stringdetailed information

ChatEvent

Ƭ ChatEvent: (jsonData: string) => void

Type declaration

• (jsonData): void

Received MGS event call

Parameters
jsonDatastring
Returns

void


CustomPropertyType

Ƭ CustomPropertyType: number boolean string Vector2 Vector Vector4 Rotation LinearColor

Custom attribute type


DelegateFuncType

Ƭ DelegateFuncType: (...arg: unknown[]) => unknown other

Type declaration

• (...arg): unknown

Proxy callback function signature


DownloadDataResponse

Ƭ DownloadDataResponse: () => void

Type declaration

• (): void

Download callback of character appearance, no parameters

Returns

void


EmptyCallback

Ƭ EmptyCallback: () => void

Type declaration

• (): void

Empty callback function type

Returns

void


HttpResponse

Ƭ HttpResponse: (result: boolean, content: string, responseCode: number) => void

Type declaration

• (result, content, responseCode): void

The callback message format for HTTP requests

Precautions

No need for active destruction, the lifecycle is managed by UOarget

Parameters
result booleanRequest successful or not
content stringMessage content
responseCode numberStatus code
Returns

void


LoadAppearanceDataAllCompletedCallback

Ƭ LoadAppearanceDataAllCompletedCallback: () => void

Type declaration

• (): void

Callback after character editor data loading

Returns

void


LocalUGCGameInfo

Ƭ LocalUGCGameInfo: Object

Local engineering information. If the project has released games in UGC consumption mode, the gameId is not empty.

Type declaration

gameId stringMW side gameId of UGC consumer games, "U_xxx" format
parentId stringThe content library gameId of the parent template game
path stringThe path of the local project does not need to be spliced and can be directly transferred to other API

MGSEvent

Ƭ MGSEvent: (jsonData: string) => void

Type declaration

• (jsonData): void

Received MGS event call

Parameters
jsonDatastring
Returns

void


MGSResponse

Ƭ MGSResponse: (isSuccess: boolean, jsonData: string) => void

Type declaration

• (isSuccess, jsonData): void

Received app replies

Parameters
isSuccessboolean
jsonDatastring
Returns

void


OnDescriptionChange

Ƭ OnDescriptionChange: (operationCode: number, index: number, value: unknown) => void

Type declaration

• (operationCode, index, value): void

Commissioned changes in appearance loading details

Parameters
operationCodenumber
indexnumber
valueunknown
Returns

void


OnDescriptionComplete

Ƭ OnDescriptionComplete: (character: Character) => void

Type declaration

• (character): void

Appearance loading completion delegate

Precautions

Execute binding function when character appearance loading is complete

Parameters
characterCharacter
Returns

void


OnKeyConsume

Ƭ OnKeyConsume: (player: Player, orderId: string, boxId: string, amount: number, confirmOrder: (bReceived: boolean) => void) => void

Type declaration

• (player, orderId, boxId, amount, confirmOrder): void

Message format for receiving shipping notifications on the deduction server for major member keys

Parameters
player PlayerPlayer
orderId stringOrder ID
boxId stringTreasure Box ID
amount numberquantity
confirmOrder (bReceived: boolean) => voidThe callback of whether the goods have been received will be sent to the order server. If the callback is false, the server will determine that the goods have not been received, and the next time the Player enters the game, the notification will be received
Returns

void


OnMovementModeChange

Ƭ OnMovementModeChange: (mode: MovementMode) => void

Type declaration

• (mode): void

Mobile status switching delegate

Parameters
modeMovementMode
Returns

void


OnOrderDelivered

Ƭ OnOrderDelivered: (playerId: number, orderId: string, commodityId: string, amount: number, confirmOrder: (bReceived: boolean, message?: string) => void) => void

Type declaration

• (playerId, orderId, commodityId, amount, confirmOrder): void

Message format for receiving shipping notifications on the server

Parameters
playerId numberPlayer ID of the player who placed the order
orderId stringOrder ID
commodityId stringProduct ID
amount numberquantity
confirmOrder (bReceived: boolean, message?: string) => voidThe callback of whether the goods have been received will be sent to the order server. If the callback is false, the server will determine that the goods have not been received, and the next time the Player enters the game, the notification will be received
Returns

void


OnViewLayoutSwitched

Ƭ OnViewLayoutSwitched: (newState: number) => void

Type declaration

• (newState): void

Message format for switching window display modes in app

Parameters
newState numberNew window mode. 1 is "Character Display Mode", 2 is "Character Editing Mode"
Returns

void


OnViewRefreshed

Ƭ OnViewRefreshed: () => void

Type declaration

• (): void

Message format for window refresh in app

Returns

void


PublishedUGCGameInfo

Ƭ PublishedUGCGameInfo: Object

Successfully released UGC consumer game information

Type declaration

end booleanWhen the API data is empty/the network request fails, end returns true
games [{ banner: string;id: string;likeIt: boolean;loveQuantity: number;packageName: string;ugcGameName: string }]When the interface data is empty/network request fails, games will return an empty list

RedeemResponse

Ƭ RedeemResponse: Object

status : Exchange status.

200 : Redemption successful

400 : Exchange failed (exchange code does not exist)

423 : Exchange failed (frequent requests)

1002 Exchange failed (exchange code is not within its expiration date)

1010 Exchange failed (exchange code already used)

1011 Exchange failed (exchange timeout)

1012 Exchange failed (gift package inventory insufficient)

1013 Exchange failed (exceeding the number of exchanges)

1014 Exchange failed (database failure)

1015 Exchange failed (non game item)

message : Exchange information

When the redemption status is successful: the redemption information is the details of the gift package content and props.

When the exchange status is failed: the exchange information is the failure details, for example: the exchange code does not exist.

Type declaration

messagestring
playerPlayer
statusnumber

SetAppearanceDataCallback

Ƭ SetAppearanceDataCallback: (APIName: string) => void

Type declaration

• (APIName): void

Set callback for data editing completion

Parameters
APINamestring
Returns

void


StringCallback

Ƭ StringCallback: (str: string) => void

Type declaration

• (str): void

Return callback for String

Parameters
strstring
Returns

void


StringResponse

Ƭ StringResponse: (dataString: string) => void

Type declaration

• (dataString): void

Return string callback

Parameters
dataStringstring
Returns

void


TabGroupOnClickedProps

Ƭ TabGroupOnClickedProps: Object

Tab group - click event type


TeamMatchFailureInfo

Ƭ TeamMatchFailureInfo: Object

Team jumping game request failed callback

Type declaration

failedReason stringReason for failure
playerIds number[]PlayerId array of team Player

TeleportData

Ƭ TeleportData: string string[] Record<string, any> Record<string, any>[]

Types of data that can be carried during transmission


TransactionType

Ƭ TransactionType: (isSuccess: boolean, content: string) => void

Type declaration

• (isSuccess, content): void

Mall communication callback message format

Parameters
isSuccess booleanCommunication results
content stringMessage content
Returns

void


TweenEasingFunction

Ƭ TweenEasingFunction: (amount: number) => number

Type declaration

• (amount): number

Definition of Types for Slow Functions

Parameters
amountnumber
Returns

number


TweenInterpolationFunction

Ƭ TweenInterpolationFunction: (v: number[], k: number) => number

Type declaration

• (v, k): number

Definition of interpolation function types

Parameters
vnumber[]
knumber
Returns

number


TweenUnknownProps

Ƭ TweenUnknownProps: Record<string, any>

The user can freely expand the definition of the supplementary property


UGCTemplateInfo

Ƭ UGCTemplateInfo: Object

UGC Template Information

Type declaration

fileUrl { assetDataListUrl: string;zipUrl: string }Download link
fileUrl.assetDataListUrl stringTemplate assetJson file download link
fileUrl.zipUrl stringTemplate project download link
gameIdentity stringMW side gameId
gid stringContent library gameId
icon stringTemplate Icon Download Link
id numberID used for pagination
name stringTemplate Name
packageName stringTemplate package name
version stringTemplate version number

UploadDataResponse

Ƭ UploadDataResponse: (success: boolean) => void

Type declaration

• (success): void

Download callback message format for character image

Parameters
success booleanIs the upload successful
Returns

void


VehicleGearDataNew

Ƭ VehicleGearDataNew: Object

Four wheel vehicle gear attributes

Type declaration

gearDownRatio numberLower gear ratio
gearLevel numberGear level
gearRatio numberTooth ratio ratio
gearUpRatio numberRatio of upper teeth

VehicleWheelDataNew

Ƭ VehicleWheelDataNew: Object

Four Wheel Vehicle Wheel property

Type declaration

wheelAngle numberMaximum steering angle of the wheels
wheelModel stringWheel binding GameObject ID
wheelRadius numberWheel radius

VoidResponse

Ƭ VoidResponse: () => void

Type declaration

• (): void

Return a callback without parameters

Returns

void


downloadCharacterDataStringCallback

Ƭ downloadCharacterDataStringCallback: (dataString: string) => void

Type declaration

• (dataString): void

Download platform data callback

Parameters
dataStringstring
Returns

void


keyUsageInfo

Ƭ keyUsageInfo: Object

Large member consumption key order. OrderId: Order ID, boxId: Treasure Box ID, number: Quantity of Treasure Boxes Purchased, shipTime: Shipping Time, Millisecond Timestamp

Type declaration

boxIdstring
consumeTimenumber
numbernumber
orderIdstring

maskWordCheckResult

Ƭ maskWordCheckResult: Object

Masked word detect result

Type declaration

hits string[]The hit text is empty if it passes detect
result booleanPassed or not, true - Passed, false - Not Passed

onAppearanceDataChanged

Ƭ onAppearanceDataChanged: (GUID: string) => void

Type declaration

• (GUID): void

Character GUID switch success callback

Parameters
GUIDstring
Returns

void

Variables

Client

Const Client: FunctionOption other

client


Multicast

Const Multicast: FunctionOption other

Multicast


Result

Const Result: FunctionOption other

Implementing RPC function return values in conjunction with Client Server


Server

Const Server: FunctionOption other

Server side


UILayerBottom

Const UILayerBottom: 1

The bottom level zOrder starts at 100000


UILayerDialog

Const UILayerDialog: 5

Dialogue zOrder starts at 500000


UILayerError

Const UILayerError: 7

Error This layer cannot be used. If you need to add a layer, you can use addUILayerMap zOrder from 700000


UILayerMiddle

Const UILayerMiddle: 2

Mid level zOrder starts at 200000


UILayerOwn

Const UILayerOwn: 3

Exclusive layer (calling this layer will automatically hide the Bottom and Middle layers) zOrder starts at 300000


UILayerScene

Const UILayerScene: 0

Scene zOrder starts at 0


UILayerSystem

Const UILayerSystem: 6

System zOrder started at 600000


UILayerTop

Const UILayerTop: 4

Top level zOrder starts at 400000


Unreliable

Const Unreliable: FunctionOption other

Unreliable RPC

Functions

Component

Component<T>(component): T other

Declare the class as mwclass

Type parameters

Textends typeof Script

Parameters

component TUsage: Custom Class

Returns

TCustom Class

Property

Property(option?): (target: object, key: string) => void other

Attribute supports synchronization

Parameters

option? IPropertyOptionsUsage: configuration default: configuration

Returns

fnvoid

RemoteFunction

RemoteFunction(...options): (target: unknown, propertyKey: string, descriptor: PropertyDescriptor) => void other

Function supports Rpc calling

Parameters

...options FunctionOption[]Usage: Rpc call mode

Returns

fnvoid

Serializable

Serializable<T>(type): T other

Type support replicated

Type parameters

Textends ConstructorType

Parameters

type TUsage: Custom Class

Returns

TCustom Class

absoluteToLocal

absoluteToLocal(geometry, absolutePosition): Vector2 other

Convert absolute coordinates to relative coordinates

Parameters

geometry GeometryUsage: Geometry
absolutePosition Vector2Usage: Absolute coordinates

Returns

Vector2Relative coordinates

absoluteToViewport

absoluteToViewport(absoluteDesktopPosition, outPixelPosition, outViewportPosition): void other

Convert the absolute coordinates of geometric shapes in desktop space to local viewport coordinates

Parameters

absoluteDesktopPosition Vector2Usage: Absolute desktop coordinates
outPixelPosition Vector2Usage: Can be used for line trajectories and other purposes, you need spatial coordinates in viewport resolution units
outViewportPosition Vector2Usage: If you want to add another widget to the same position in the viewport space

asyncCreateUI

asyncCreateUI<T>(UIPrefabName, panelClass): Promise<T> other

Asynchronous create UI

Type parameters

Textends UIScript<T>

Parameters

UIPrefabName stringUsage: specify the path relative to the project or the path relative to the UI directory for the UI customize widget
panelClass () => TUsage: derived class inherited from script on UI

Returns

Promise<T>Corresponding UI

asyncCreateUIByName

asyncCreateUIByName(UIPath): Promise<UserWidget> other

Asynchronous create UI, null if failed

Parameters

UIPath stringUsage: Create the complete path of the UI range: Path length

Returns

Promise<UserWidget>Corresponding UI

cancelDragDrop

cancelDragDrop(): void other

Interrupt all DragDrop operations


createUI

createUI<T>(UIPrefabName, panelClass): T other

Create UIPrefab

Type parameters

Textends UIScript<T>

Parameters

UIPrefabName stringUsage: Specify the path of the UI custom control relative to the project or relative to the UI directory. If left blank, it is equal to creating UIOnlyClass range. There is no limit on the length of the path
panelClass () => TUsage: derived class inherited from script on UI

Returns

TCorresponding UI

createUIByName

createUIByName(UIPrefabName): UserWidget other

Create UIPrefab

Parameters

UIPrefabName stringUsage: specify the path relative to the project or the path relative to the UI directory of the UI customize widget range: the length of the path is unlimited

Returns

UserWidgetCorresponding UI

createUIByPath

createUIByPath(UIPath): UserWidget other

Create UIPrefab

Parameters

UIPath stringUsage: Create the complete path of the UI range: Path length

Returns

UserWidgetCorresponding UI

createUIOnlyClass

createUIOnlyClass<T>(panelClass): T other

Create an empty UI

Type parameters

Textends UIScript<T>

Parameters

panelClass () => TUsage: specify the behavior script on the UI widget

Returns

TCorresponding UI

endDragDrop

endDragDrop(InReply): void other

Interrupt a drag event and pass in an action event

Parameters

InReply EventReplyUsage: Event

fetch

fetch(url, init?): Promise<Response> other

HTTP request

Parameters

url stringurl range: No restrictions imposed
init? RequestInitUsage: request information default: request information

Returns

Promise<Response>Response information

findUIScript

findUIScript(UI): UIScript other

Get UI script

Parameters

UI WidgetUsage: UI widget

Returns

UIScriptScript for UI Binding

generalHttpRequest

generalHttpRequest(response, requestUrl, param, jsonContent, requestType): boolean other

Universal HTTP Request

Usage example: Send Http request

ts
generalHttpRequest(Response,Url,Param,JsonContent)
generalHttpRequest(Response,Url,Param,JsonContent)

Parameters

response HttpResponseOnHttpResponse
requestUrl HttpRequestURLEHttpRequestURL
param stringstring range: No restrictions imposed
jsonContent anyany
requestType HttpRequestTypeUsage: 0 is Get 1 is Post

Returns

booleanbool

getAbsoluteSize

getAbsoluteSize(geometry): Vector2 other

Return the size of geometric shapes in absolute space

Parameters

geometry GeometryUsage: Geometry

Returns

Vector2Return to Size

getAssetIconDataByAssetID

getAssetIconDataByAssetID(asset, size?): AssetIconData other

Get ICON information of asset

Parameters

asset stringUsage: Specify the ID range of the resource based on the length of the resource ID.
size? AssetIconSizeUsage: specify the resolution size of the asset

Returns

AssetIconDataICON information of resources

getCurrentMousePosition

getCurrentMousePosition(): Vector2 other

Get the absolute position of the current mouse

Returns

Vector2Absolute position

getDragDroppingContent

getDragDroppingContent(): DragDropOperation other

Get the current DragDrop event

Returns

DragDropOperationReturn the current DragDrop event

getLastMousePosition

getLastMousePosition(): Vector2 other

Get the absolute position of the last mouse

Returns

Vector2Absolute position

getLocalSize

getLocalSize(geometry): Vector2 other

Return the size of geometric shapes in local space

Parameters

geometry GeometryUsage: Geometry

Returns

Vector2Return to Size

getLocalTopLeft

getLocalTopLeft(geometry): Vector2 other

Return the local top/left side of geometric shapes in local space

Parameters

geometry GeometryUsage: Geometry

Returns

Vector2Return to LeftTop

getMousePositionOnPlatform

getMousePositionOnPlatform(): Vector2 other

Get the mouse cursor position of the platform. This is the absolute desktop position of the mouse.

Returns

Vector2Return to the position of the mouse cursor of the platform. This is the absolute desktop position of the mouse.

getMousePositionOnViewport

getMousePositionOnViewport(): Vector2 other

Retrieve the position of the platform's mouse cursor in the local space of the viewport control.

Returns

Vector2Returns the position of the platform's mouse cursor in the local space of the viewport widget.

getPlayerScreenWidgetGeometry

getPlayerScreenWidgetGeometry(player): Geometry other

Gets the geometry of all widget that are added to the "player screen", including widget. You can use this geometric shape to convert controls between absolute and local space.

Parameters

player PlayerUsage: Player's position in the world of the game is projected to the controller on the screen

Returns

GeometryReturns the geometry of all widget 'widget

getResolutionChanged

getResolutionChanged(Delegate): void other

Callback when resolution change

Parameters

Delegate MulticastDelegate<(x: number, y: number) => void>Usage: Pass in callback function

getUrlParameter

getUrlParameter(url, parameterName): string other

Get URL parameters

Parameters

url stringurl range: No restrictions, based on the specific length of the URL
parameterName stringUsage: Parameter name range: Unrestricted

Returns

stringParameter values

getViewportScale

getViewportScale(): number other

Gets the current DPI Scale applied to the viewport and all widgets.

Returns

numberReturns the current DPI Scale applied to the viewport and all widgets.

getViewportSize

getViewportSize(): Vector2 other

Get the size of the game viewport.

Returns

Vector2Return the size of the game viewport.

getViewportWidgetGeometry

getViewportWidgetGeometry(): Geometry other

Get the geometric shape of the control that contains all the controls added to the viewport. You can use this geometry to convert widget between absolute and local widget.

Returns

GeometryReturns the geometry of all widget 'widget

httpRequestTransmitData

httpRequestTransmitData(response, paramUrl, jsonContent, requestType): boolean other

Http request API

Parameters

response HttpResponseRequest callback
paramUrl stringRequest parameters and values range: Unrestricted
jsonContent stringRequest data content, JSON format range: no restrictions
requestType HttpRequestTypeRequest type. HttpRequestType enumeration value

Returns

booleanHas the request been successfully sent

isDragDropping

isDragDropping(): boolean other

Determine if there is currently a DragDrop event

Returns

booleanboolean

isUnderLocation

isUnderLocation(geometry, absolutePosition): boolean other

Determine whether the given coordinates are in geometry

Parameters

geometry GeometryUsage: Geometry
absolutePosition Vector2Usage: Absolute coordinates

Returns

booleanAre the coordinates in geometry

localToAbsolute

localToAbsolute(geometry, localPosition): Vector2 other

Convert local coordinates to absolute coordinates, which can be desktop space or window space, depending on the space where the root of the widget hierarchy is located.

Parameters

geometry GeometryUsage: Geometry
localPosition Vector2Usage: relative coordinates

Returns

Vector2Absolute coordinates

localToViewport

localToViewport(geometry, localPosition, outPixelPosition, outViewportPosition): void other

Convert the local coordinates of the geometry to local viewport coordinates.

Parameters

geometry GeometryUsage: Geometry
localPosition Vector2Usage: local coordinates
outPixelPosition Vector2Usage: It can be used for the track of lines and other purposes. You need the spatial coordinates of resolution units in the viewport.
outViewportPosition Vector2Usage: If you want to add another widget to the same position in the viewport space

releaseAssetIconTextureFromCache

releaseAssetIconTextureFromCache(asset): void other

Try to mark the ICON graph of asset as waiting for release and waiting for release

Parameters

asset stringUsage: Specify the ID range of the resource based on the length of the resource ID.

screenToViewport

screenToViewport(screenPosition): Vector2 other

Converts the screen position (in pixels) to the local space of the viewport widget.

Parameters

screenPosition Vector2Usage: screen position

Returns

Vector2Local location

screenToWidgetAbsolute

screenToWidgetAbsolute(screenPosition, isIncludeWindowPosition?): Vector2 other

Converts the screen position (pixels) to absolute desktop program coordinates. If bIncludeWindowPosition is true, then this method will also remove the position of the game window (useful in window mode).

Parameters

screenPosition Vector2Usage: screen position
isIncludeWindowPosition? booleanUsage: Whether to remove the position of the game window (useful in window mode) default: false

Returns

Vector2Absolute desktop program coordinates

screenToWidgetLocal

screenToWidgetLocal(geometry, screenPosition, isIncludeWindowPosition?): Vector2 other

Convert the screen position (in pixels) to the local space of a widget with a given geometric shape. If bIncludeWindowPosition is true, this method will also remove the position of the game window (useful in window mode).

Parameters

geometry GeometryUsage: Collection
screenPosition Vector2Usage: screen position
isIncludeWindowPosition? booleanUsage: Whether to remove the position of the game window (useful in window mode) default: false

Returns

Vector2Local position of the widget

setFocusToGameViewport

setFocusToGameViewport(): void other

Set up follow game window


setInputModeGameAndUI

setInputModeGameAndUI(InWidgetToFocus?, InMouseLockMode?, hideCursorDuringCapture?): void other

Set an input mode that only allows the UI to respond to user input. If the UI does not handle it, Player input/Player controller will have a chance

Parameters

InWidgetToFocus? WidgetUsage: widget that responds to input mode default: null
InMouseLockMode? MouseLockModeUsage: mouse locked input mode default: UIType MouseLockMode.DoNotLock
hideCursorDuringCapture? booleanUsage: Hide cursor default: true

setInputModeGameOnly

setInputModeGameOnly(): void other

Set an input mode, allowing only Player input/Player controller to respond to user input


setInputModeUIOnly

setInputModeUIOnly(InWidgetToFocus?, InMouseLockMode?): void other

Set the input mode that only allows the UI to respond to user input.

Parameters

InWidgetToFocus? WidgetUsage: widget that responds to input mode default: null
InMouseLockMode? MouseLockModeUsage: mouse locked input mode default: UIType MouseLockMode.DoNotLock

startRecord

startRecord(screenX, screenY, screenW, screenH): string other

Screen recording

Parameters

screenX numberX value in the upper left corner of the screen
default: null Required parameters
range: unlimited
type: floating point number
screenY numberY value in the upper left corner of the screen
default: null Required parameter
range: unlimited
type: floating point number
screenW numberRecorded image width
default: null Required parameter
range: unlimited
type: floating point
screenH numberRecorded image height
default: null Required parameter
range: unlimited
type: floating point

Returns

stringmp4 File path. The file path is fixed, and there may be slight differences in the path across different platforms.

stopRecord

stopRecord(): void other

Stop screen recording


transformVectorAbsoluteToLocal

transformVectorAbsoluteToLocal(geometry, absoluteVector): Vector2 other

Convert vectors from absolute space to local space

Parameters

geometry GeometryUsage: Geometry
absoluteVector Vector2Usage: Absolute space vector

Returns

Vector2Vector in Local Space

transformVectorLocalToAbsolute

transformVectorLocalToAbsolute(geometry, localVector): Vector2 other

Convert vectors from local space to absolute space

Parameters

geometry GeometryUsage: Geometry
localVector Vector2Usage: Vector in Local Space

Returns

Vector2Absolute space vector

urlDecode

urlDecode(str): string other

URL decoding

Parameters

str stringUsage: content range: no restrictions

Returns

stringThe decoded content

urlEncode

urlEncode(str): string other

URL transcoding

Parameters

str stringUsage: content range: no restrictions

Returns

stringTranscoded content

vibrate

vibrate(enable): void other

Vibration switch

Parameters

enable booleanUsage: - true: turn on vibration, - false: turn off vibration