English Welcome to the Unity Scripting Reference! This section of the documentation contains details of the scripting API that Unity provides. To use this information, you should be familiar with the basic theory and practice of scripting in Unity which is explained in the Scripting section of our manual. The scripting reference is organised according to the classes available to scripts which are described along with their methods, properties and any other information relevant to their use. The pages are extensively furnished with example code "examples" ; notwithstanding anything in the Terms of Service to the contrary, Unity grants you a non-exclusive, non-transferable, non-sublicensable, royalty-free license to access, to use, to modify, and to distribute the examples without crediting Unity. API are grouped by namespaces they belong to, and can be selected from the sidebar to the left.

Author:Mitaur Aralar
Language:English (Spanish)
Published (Last):11 March 2014
PDF File Size:11.74 Mb
ePub File Size:15.72 Mb
Price:Free* [*Free Regsitration Required]

Overview UFrame is a framework plug-in for Unity3D developers, whi c h itself mimics the architecture pattern of MVVM in fact, it does not include the Model part, and more than the Controller part. Because it is used in Unity3D, it provides developers with a visual editing tool based on Editor, which can be used to manage code structure and so on.

This article is a record of uFrame 1. It mainly includes some basic concepts in uFrame and the application process. New uFrame Project The main contents of this section include: New project in uFrame Open the Engineering Warehouse in the Visual Editor of uFrame Set up the namespace of the project in the visual editor of uFrame for use in generating template code 2.

We can rename this file to suit our habits. So far, we have completed the task of creating a new project in uFrame. Open the Engineering Warehouse in the Visual Editor of uFrame After creating the uFrame project, we can open the project in the graph designer provided by the uFrame. In this way, we open the newly created uFrame project in the editor of the uFrame. Therefore, we can set up some information to generate the corresponding template code.

For example, we can set up the project namespace here, so that the generated code will be in the namespace we set up. Select the project warehouse file generated in 2. So far, the basic settings of the whole project have been completed. Next, we will continue to carry out some specific operations. The graph is a concept in uFrame. Every graph in uFrame project exists in the folder of the project in the form of a file. Each graph can contain many Nodes, and the nodes in the same project can be shared between the graph and the graph.

We can create a graph by using the visual editor of uFrame. On the left side of the designer, we can open the selection box of the graph: The selection box lists the types of diagrams that can be created. It is important to note that the image created at this time is automatically linked to the selected project, and the drawing file is created in the folder of the selected project. We can see that when created, the graph only includes one node Node , which represents the graph itself, and we can call it Graph node.

Moreover, a drawing file was created in our engineering folder. If you need to change the name of the graph, we can modify the name of the graph node directly in the designer, right-click on the node, and select Rename. We just need to right-click in the blank to pop up a selection menu: Select Add Sub System to add a subsystem to the FoxMain environment. Be careful:We need to remind you that the content of the menu is different in different environments and the elements that can be added are different.

So when you want to create the target node, you must determine the current environment you can see the current environment in the upper left corner, such as FoxMain. Create Nodes The main contents of this section include: Explain what Element nodes are and create Element nodes Explain what a View node is and create a View node 4. Element nodes In the designer, the Element node mainly defines ViewModel and Controller, and the data in Element mainly consists of three parts: Property, mainly single data Collection, mainly data collection Command, which mainly defines some commands, is executed by Controller.

Because they are regular C types and do not inherit Monobehaviour from Unity3D, they do not depend on Unity3D, so they are portable. Right-click in the blank of the designer to bring up a selection menu, which includes many Add options, such as Command, Element, and so on. Select Add Element, and an Element node named Login is created. Be careful:Looking at the upper left corner of the designer, you can see that we are in UISys at this point, that is, we are now in the UISys graph.

The reason why I want to remind you of this point is that nodes can be added to the graph nodes of the subsystem or to other nodes. If we double-click the Login node, it will be added to the Login node as the goal. View is the presentation layer, which binds the ViewModel to display the data in the ViewModel. For example, it may be easier for you to understand this meaning: Suppose we have a PlayerView Model in our game.

For this view model, we can have a PlayerView model that corresponds to the player model in the game. We can display various actions or displacements according to the data in the view model. There can also be a PlayerInfoView corresponding to the player data UI in the game, according to the data in the same ViewModel, showing information such as player blood volume, experience value and so on.

The difference between views that bind to the same ViewModel is that each View only focuses on the data they need on the ViewModel, and that each View should be as independent as possible.

Double-click the Login node to enter the Login-targeted environment. Similar to the process of creating Element nodes, right-click on the blank to pop up the selection menu. This menu includes the option of Add View, as shown below: We can also see that the upper left corner has changed from UISys to Login today. In this way, a View node is created. Now that the nodes representing the ViewModel and the View have been created, we are going to create the data on the ViewModel.


Cg Programming/Unity



Cg Programming/Unity



Welcome to the Unity Scripting Reference!



Download Unity


Related Articles