- Home /
Visual C# Plugin
Hi,
I try make a simple plugin for Unity. Here so simple example:
using System;
using UnityEngine;
namespace ExamplePlugin
{
[Serializable]
public struct exampleFloat
{
public exampleFloat(float f)
{
.....
}
}
}
I build solution and import example.dll in Unity. Create a C# script. And it's seems like this:
Here my example Unity C# script:
using UnityEngine;
using System.Collections;
using ExamplePlugin;
public class Test : MonoBehaviour {
public exampleFloat exampleFloat;
public float normalFloat;
}
What should I do for my example float seem as a normal float in hierarchy window? Thanks a lot.
Why can't edit my variable in hierarchy? Like normal float.
I guess make I said so difficult for me. Anyway. Thank you for your suggestion. :)
Answer by richyrich · Jan 05, 2015 at 11:46 PM
The type is not known so the inspector does not know how to edit.
[Serializable]
public class ExampleFloat
{
[SerializeField]
float bella;
}
The code above will still not allow you to edit variables of type ExampleFloat, but you can edit the individual fields, in this case 'bella'.
Your answer
Follow this Question
Related Questions
Unity plugin folder 0 Answers
How to access USB on Linux 1 Answer
Plugins, like Perlin noise, in the Unity indie 1 Answer
Can I create plugins for Unity > Flash exported games? 0 Answers
How do I implement In-App purchases for Windows/Windows Phone? 2 Answers