“I simply don’t get it”, because I lack of programming background and no matter how hard I searched for a workaround, I didn’t manage to figure it out. So I probably need to do much more reading, but in case there is a straightforward answer, I’d be glad to know it and proceed further, instead of digging into these stuff that I barely understand in order to know where to focus exactly.
The problem appears when I try to translate this C# class into Unityscript:
using UnityEngine;
public class TilePrefab : MonoBehaviour, IDFVirtualScrollingTile
{
....
public int VirtualScrollItemIndex { get; set; }
....
}
where the IDFVirtualScrollingTile interface is also written in C# as:
public interface IDFVirtualScrollingTile
{
int VirtualScrollItemIndex { get; set; }
....
}
So far, among other approaches, I have tried this:
#pragma strict
public class TestTilePrefab extends MonoBehaviour implements IDFVirtualScrollingTile
{
//I don't know how to translate the get, set line
}
but it has thrown different kinds of warnings and errors with the more popular to be:
BCE0141: Duplicate parameter name
‘value’ in
'TestTilePrefab.set_VirtualScrollItemIndex(int,
int)
when for example I don’t include the before-mentioned line or
BCW0011: WARNING: Type
‘TestTilePrefab’ does not provide an
implementation for
‘IDFVirtualScrollingTile.VirtualScrollItemIndex’,
a stub has been created.
when I used some syntax of the javascript getter/setter method I found elsewhere. I even experimented to get the interface as Component, but I failed there too.
Any kind of help is welcome.