当前位置:网站首页>Fgui project packaging and Publishing & importing unity & the way to display the UI
Fgui project packaging and Publishing & importing unity & the way to display the UI
2022-07-06 12:57:00 【SQ Liu】
FGUI Project package release & Import Unity& take UI Show the way
One 、 Package and publish project
Two 、Unity Running display in UI Two ways
Preface : If there is no previous Download FairyGUI, You can download it in the resource store and import it .
(1) Manually add , No code required
terms of settlement :
(2) Code control display
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using FairyGUI;
public class FGUITest001 : MonoBehaviour
{
void Start()
{
GRoot.inst.SetContentScaleFactor(800, 600); // Initialize and set the appropriate proportion ( The resolution is set )
UIPackage.AddPackage("FGUI/Package1"); // Load the packaged project
GComponent component = UIPackage.CreateObject("Package1", "Component1").asCom;
// Load the corresponding component adopt .asCom( or as GComponent) Type conversion converts it to GComponent Component type
GRoot.inst.AddChild(component); // Instantiate the current component to UI Panel(GRoot It's actually UI Panel) Below
}
}
thus , Complete .
边栏推荐
猜你喜欢
3月15号 Go 1.18 正式版发布 了解最新特色以及使用方法
Unity3D,阿里云服务器,平台配置
平衡二叉树详解 通俗易懂
The master of double non planning left the real estate company and became a programmer with an annual salary of 25W. There are too many life choices at the age of 25
Fabrication d'un sac à dos simple fairygui
FairyGUI增益BUFF数值改变的显示
NovAtel 板卡OEM617D配置步骤记录
Halcon knowledge: gray_ Tophat transform and bottom cap transform
Mixed use of fairygui button dynamics
RTKLIB: demo5 b34f. 1 vs b33
随机推荐
2022国赛Re1 baby_tree
(the first set of course design) sub task 1-5 317 (100 points) (dijkstra: heavy edge self loop)
Compile GDAL source code with nmake (win10, vs2022)
(the first set of course design) 1-4 message passing interface (100 points) (simulation: thread)
rtklib单点定位spp使用抗差估计遇到的问题及解决
基于rtklib源码进行片上移植的思路分享
The service robots that have been hyped by capital and the Winter Olympics are not just a flash in the pan
Naive Bayesian theory derivation
基本Dos命令
Force buckle 1189 Maximum number of "balloons"
[Yu Yue education] guide business reference materials of Wuxi Vocational and Technical College of Commerce
1041 be unique (20 points (s)) (hash: find the first number that occurs once)
The earth revolves around the sun
[dry goods] cycle slip detection of suggestions to improve the fixed rate of RTK ambiguity
NovAtel 板卡OEM617D配置步骤记录
[算法] 剑指offer2 golang 面试题6:排序数组中的两个数字之和
地球围绕太阳转
雇佣收银员【差分约束】
[GNSS] robust estimation (robust estimation) principle and program implementation
Usage differences between isempty and isblank