Exemple #1
0
		internal static int BuildMesh(int id, string inputFilename, string navMeshFilename, BuildMeshCallback callback)
		{
			inputFilename += "\0";
			navMeshFilename += "\0";
			var inputFilenameBytes = Encoding.ASCII.GetBytes(inputFilename);
			var navMeshFilenameBytes = Encoding.ASCII.GetBytes(navMeshFilename);
			return BuildMeshFromFile(id, inputFilenameBytes, navMeshFilenameBytes, callback);
		}
Exemple #2
0
 public static extern int BuildMeshFromFile(int userId,
                                            byte[] inputFilename,
                                            byte[] navMeshFilename,
                                            [MarshalAs(UnmanagedType.FunctionPtr)] BuildMeshCallback callback,
                                            int numCores);
Exemple #3
0
        internal static int BuildMesh(int id, string inputFilename, string navMeshFilename, BuildMeshCallback callback)
        {
            inputFilename   += "\0";
            navMeshFilename += "\0";
            var inputFilenameBytes   = Encoding.ASCII.GetBytes(inputFilename);
            var navMeshFilenameBytes = Encoding.ASCII.GetBytes(navMeshFilename);

            //Console.WriteLine(string.Format("The number of processors on the system is: {0}", Environment.ProcessorCount));
            return(BuildMeshFromFile(id, inputFilenameBytes, navMeshFilenameBytes, callback, Environment.ProcessorCount));
        }
Exemple #4
0
 internal static int BuildMesh(int id, string inputFilename, string navMeshFilename, BuildMeshCallback callback)
 {
     inputFilename += "\0";
     navMeshFilename += "\0";
     var inputFilenameBytes = Encoding.ASCII.GetBytes(inputFilename);
     var navMeshFilenameBytes = Encoding.ASCII.GetBytes(navMeshFilename);
     //Console.WriteLine(string.Format("The number of processors on the system is: {0}", Environment.ProcessorCount));
     return BuildMeshFromFile(id, inputFilenameBytes, navMeshFilenameBytes, callback, Environment.ProcessorCount);
 }