Skip to content

Editor won't shows functions with parameters #1

@carlosgc

Description

@carlosgc

Hi,

I trying to use Signal with the last version of Unity but the editor is not showing my gameobject function when parameters are added to it. I followed the tutorial found at http://unitypatterns.com/resource/signals and my code is right, apparently. Any idea of whats can be happening?

The editor are showing the gameobject functions with no parameters and they are working fine.

Thanks

using UnityEngine;
using System.Collections;

public class BoardController : MonoBehaviour
{
    void Start ()
    {
    }

    void Update ()
    {
    }

    [Signal]
    void onBoardTouchEnd(TouchHelper touchHelper)
    {
        Debug.Log("BoardController::onBoardTouchEnd");
    }
}
using UnityEngine;
using System.Collections;

public class TouchHelper : MonoBehaviour
{
    public Signal onTouchEnd = new Signal(typeof(TouchHelper));

    private bool dragging = false;

    void OnMouseUp()
    {
        this.dragging = false;
        if(this.onTouchEnd != null)
        {
            this.onTouchEnd.Invoke(this);
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions