小编Wye*_*ott的帖子

Unity 未在事件字段中显示公共方法

我在 Unity 2017 中有一个类,它只显示了检查器中的一些公共方法。

using System.Collections.Generic;
using UnityEngine;

public class Inventory : MonoBehaviour 
{

    List<ShipPart> _inventory;
    int currentInvPosition = 0;
    bool invExists = false;

    // Use this for initialization
    void Start () {
        CreateInventory(0, 0);
    }

    // Show all inventory parts as gameobjects
    public void CreateInventory(int quality, int part) 
    {
        ...
    }

    void DestroyInventory()
    {
        ...
    }

    public void ScrollInvLeft()
    {
        ...
    }

    public void ScrollInvRight()
    {
        ...
    }

    void UpdateInv(float offset)
    {
        ...
    }

    public void AddInventoryItem(ShipPart newShipPart) 
    { …
Run Code Online (Sandbox Code Playgroud)

events unity-game-engine

1
推荐指数
1
解决办法
2081
查看次数

标签 统计

events ×1

unity-game-engine ×1