- Tutorials
- User Interface (UI)
- Building a Framework
Building a Framework
Geprüft mit Version: 2017.3
-
Schwierigkeitsgrad: Fortgeschrittene Anfänger
In this session Online Evangelist Matt Gambell will take us through building a system that allows for a flexible and customisable way to work with UI in a project by taking advantage of the power of ScriptableObjects.


Building a Framework
Fortgeschrittene Anfänger User Interface (UI)
FlexibleUIData
Code snippet
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[CreateAssetMenu(menuName = "Flexible UI Data")]
public class FlexibleUIData : ScriptableObject
{
}
FlexibleUI
Code snippet
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class FlexibleUI : MonoBehaviour {
public FlexibleUIData skinData;
protected virtual void OnSkinUI()
{
}
public virtual void Awake()
{
OnSkinUI();
}
public virtual void Update()
{
if(Application.isEditor)
{
OnSkinUI();
}
}
}
Ähnliche Tutorials
- Introduction (Lektion)