I’ve just created a new empty project and created this script.
using System.Collections.Generic;
public class Whatever
{
private IEnumerable<int> Count3()
{
for (int i = 0; i < 3; i++)
yield return i;
}
}
This project cannot be exported to flash. I get an error.
Usage of a type or method not supported by Unity Flash.
Details: Invokes an unsupported method System.Int32
System.Threading.Interlocked::CompareExchange(System.Int32&,System.Int32,System.Int32)
on type System.Threading.InterlockedSource: E:/Unity/EpicFail/Assets/Whatever.cs(�6) at line : 6
Does anyone know why this happens? I use Unity 4.