Shared Interface

Ziv Vek

New member
I have defined a shared Interface named SharedITargetable and a shared List of interfaces named SharedIDamageableList but for some reason they are not registered in the shared variables.

Shared List of interfaces was constructed defined such:
[System.Serializable]
public class SharedIDamageableList : SharedVariable<List<IDamageable>>
{
public SharedIDamageableList()
{
mValue = new List<IDamageable>();
}

public static implicit operator SharedIDamageableList(List<IDamageable> value) { return new SharedIDamageableList { mValue = value }; }
}
}

Shared interface was defined as such:
[System.Serializable]
public class SharedITargetable : SharedVariable<ITargetable>
{
public static SharedITargetable FromITargetable(ITargetable value)
{ return new SharedITargetable { Value = value }; }
}

What could be the problem?
Is it not possible to share interfaces?
 
When you say that it's not registered, what do you mean? The inspector won't be able to show any variable values for the interface but you should be able to add it to the behavior tree.
 
Top