entity component system – Unity ECS burst compiler error "Cannot find TypeInfos field"

I receive these strange error messages every time I start my game.
I can't find out why I receive this message below.

Library PackageCache com.unity.entities@0.5.1-preview.11 Unity.Entities types TypeManager.cs (431,13): error: the field cannot be found TypeInfos required to support intrinsic burst TypeManager

The only script I have running contains this code:

using UnityEngine;
using Unity.Collections;
using Unity.Entities;
using Unity.Mathematics;
using Unity.Rendering;
using Unity.Burst;
using Unity.Transforms;
using System.Collections;
using System.Collections.Generic;

public class PhysicsManager : MonoBehaviour
{
    // Start is called before the first frame update.
    void Start()
    {
        // Get the entitymanager.
        EntityManager entityManager = World.Active.EntityManager;

        // Step 1 : create EntityArchetype.

        EntityArchetype pixel = entityManager.CreateArchetype(
            typeof(RenderMesh),
            typeof(LocalToWorld),
            typeof(Translation)
        );


        // Step 2 : create all entities.

        entityManager.CreateEntity(pixel);


        // Step 3 : try some scripting with entities.
    }

    // Update is called once per frame.
    void Update()
    {

    }
}

Unity – Game requirements for my game?

Thank you for contributing a response to Game Development Stack Exchange!

  • Please make sure answer the question. Provide details and share your research!

But avoid

  • Ask for help, clarifications or respond to other answers.
  • Make statements based on opinion; Support them with references or personal experience.

Use MathJax to format equations. MathJax reference.

For more information, see our tips on how to write excellent answers.

entity component system – Unity ECS burst compiler error

I receive these strange error messages every time I start my game.
I can't find out why I receive this message below.

LibraryPackageCachecom.unity.entities@0.5.1-preview.11Unity.EntitiesTypesTypeManager.cs(431,13): error: Cannot find the field `TypeInfos` required for supporting TypeManager intrinsics in burst

The only script I have running contains this code:

using UnityEngine;
using Unity.Collections;
using Unity.Entities;
using Unity.Mathematics;
using Unity.Rendering;
using Unity.Burst;
using Unity.Transforms;
using System.Collections;
using System.Collections.Generic;

public class PhysicsManager : MonoBehaviour
{
    // Start is called before the first frame update.
    void Start()
    {
        // Get the entitymanager.
        EntityManager entityManager = World.Active.EntityManager;

        // Step 1 : create EntityArchetype.

        EntityArchetype pixel = entityManager.CreateArchetype(
            typeof(RenderMesh),
            typeof(LocalToWorld),
            typeof(Translation)
        );


        // Step 2 : create all entities.

        entityManager.CreateEntity(pixel);


        // Step 3 : try some scripting with entities.
    }

    // Update is called once per frame.
    void Update()
    {

    }
}

I hope one of you knows how to solve this problem.
Thanks in advance!

Call the native code from the Unity iOS build error

I created NativeCallProxy.cs in Unity

    public class NativeCallProxy: MonoBehaviour
    {
        (DllImport("__Internal"))
        public static extern void iOSUnloadUnityGame();

        public static void UnloadUnityGame()
        {
#if UNITY_IPHONE
            // Now we check that it's actually an iOS device/simulator, not the Unity Player. You only get plugins on the actual device or iOS Simulator.
            if (Application.platform == RuntimePlatform.IPhonePlayer)
            {
                iOSUnloadUnityGame();
            }
#endif
        }
    }

and created two files in Assets / Plugin / iOS
NativeCallProxy.m

#import 
#import "NativeCallProxy.h"

@implementation UnityBridgeAPI
id api = NULL;
+ (void) registerAPIForNativeCalls:(id)proxy {
    api = proxy;
}
@end

Y NativeCallProxy.h

#ifndef NativeCallProxy_h
#define NativeCallProxy_h

@protocol UnityBridgeNativeCallsProtocol
@required
- (void)unloadUnityGame;
@end

__attribute__((visibility("default")))
@interface UnityBridgeAPI: NSObject
+ (void) registerAPIForNativeCalls:(id)proxy;
@end


#endif /* NativeCallProxy_h */

and when I try to compile the exported project I get an error in Xcode.

enter the description of the image here

How can I solve it?

unity – Multithreading bug – Game development stack exchange

I am following Sebastian Lague's tutorial videos on how to create a procedure-generated world. I have completely followed his tutorial, except for the fact that I created a double precision algorithm for perlin noise. My only problem is the fact that I don't think it is thread safe and is returning strange values, any ideas?

Code:

 using UnityEngine;
using System.Collections;
using System;

public static class Noise {
    static int() p = new int(Convert.ToInt32(Math.Pow(2,12)));

    public static double(,) GenerateNoiseMap(int mapWidth, int mapHeight, int seed, float scale, int octaves, float persistance, float lacunarity, Vector2 offset) {
        double(,) noiseMap = new double(mapWidth, mapHeight);

        if (scale <= 0) { scale = 1; }

        System.Random prng = new System.Random(seed);
        Vector2() octaveOffsets = new Vector2(octaves);
        for (int i = 0; i < octaves; i++) {
            float offsetX = prng.Next(-100000, 100000) + offset.x;
            float offsetY = prng.Next(-100000, 100000) + offset.y;
            octaveOffsets(i) = new Vector2(offsetX, offsetY);
        }

        if (scale <= 0) {
            scale = 0.0001f;
        }

        float maxNoiseHeight = float.MinValue;
        float minNoiseHeight = float.MaxValue;

        float halfWidth = mapWidth / 2f;
        float halfHeight = mapHeight / 2f;

        Noise2d _noise = new Noise2d();

        for (int y = 0; y < mapHeight; y++) {
            for (int x = 0; x < mapWidth; x++) {

                float amplitude = 1;
                float frequency = 1;
                double noiseHeight = 0;

                for (int i = 0; i < octaves; i++) {
                    double sampleX = (double)(x - halfWidth) / scale * frequency + octaveOffsets(i).x + 0.001;
                    double sampleY = (double)(y - halfHeight) / scale * frequency + octaveOffsets(i).y + 0.001;

                    double perlinValue = _noise.Noise(sampleX, sampleY);
                    noiseHeight += perlinValue * amplitude;
                    //Debug.Log(perlinValue);


                    amplitude *= persistance;
                    frequency *= lacunarity;
                }

                if (noiseHeight > maxNoiseHeight) {
                    maxNoiseHeight = (float)noiseHeight;
                }
                else if (noiseHeight < minNoiseHeight) {
                    minNoiseHeight = (float)noiseHeight;
                }
                noiseMap(x, y) = noiseHeight;
            }
        }

        for (int y = 0; y < noiseMap.GetLength(1); y++) {
            for (int x = 0; x < noiseMap.GetLength(0); x++) {
                noiseMap(x, y) = (double)Mathf.InverseLerp(minNoiseHeight, maxNoiseHeight, (float)noiseMap(x, y));
            }
        }


        return noiseMap;
    }

    public static void init(int seed) {
        createGradients(p, seed);
    }

    public static int() createGradients(int() p, int seed) {
        System.Random prng = new System.Random(seed);
        for (int i = 0; i < p.GetLength(0) / 2; i++) {
            p(i) = prng.Next(0, 256);
            p(i + ((int)p.GetLength(0) / 2)) = p(i);
        }

        return p;
    }

    static vector2dDouble generateGradient(int val) {
        int hash = val & 7;
        switch (hash) {
            case 0:
                return new vector2dDouble(1.0, 1.0);
            case 1:
                return new vector2dDouble(-1.0, 1.0);
            case 2:
                return new vector2dDouble(-1.0, -1.0);
            case 3:
                return new vector2dDouble(1.0, -1.0);
            case 4:
                return new vector2dDouble(0, 1.41);
            case 5:
                return new vector2dDouble(0, -1.41);
            case 6:
                return new vector2dDouble(-1.41, 0);
            case 7:
                return new vector2dDouble(1.0, 0);
            default: return new vector2dDouble(0, 0);
        }
    }

    public class Noise2d {

        public double Noise(double x, double y) {

            int ix = Convert.ToInt32(Math.Floor(x)) & (p.GetLength(0) / 2 - 1);
            int iy = Convert.ToInt32(Math.Floor(y)) & (p.GetLength(0) / 2 - 1);


            x -= Math.Floor(x);
            y -= Math.Floor(y);

            vector2dDouble v1 = new vector2dDouble(x - 1, y - 1),
                           v2 = new vector2dDouble(x, y - 1),
                           v3 = new vector2dDouble(x - 1, y),
                           v4 = new vector2dDouble(x, y);

            int g1 = p(p(ix + 1) + iy + 1),
                g2 = p(p(ix) + iy + 1),
                g3 = p(p(ix + 1) + iy),
                g4 = p(p(ix) + iy);

            double u = fade(x);
            double v = fade(y);

            double f1 = v1.dot(generateGradient(g1)),
                   f2 = v2.dot(generateGradient(g2)),
                   f3 = v3.dot(generateGradient(g3)),
                   f4 = v4.dot(generateGradient(g4));

            return lerp(u, lerp(v, f4, f2), lerp(v, f3, f1));
        }
        double lerp(double t, double argc, double argv) { return argc + t * (argv - argc); }

        double fade(double t) { return t * t * t * (t * (t * 6 - 15) + 10); }
    }
}

(System.Serializable)
public struct vector2dDouble {
    public double x, y;

    public vector2dDouble(double argx, double argy) {
        x = argx;
        y = argy;
    }

    public double dot(vector2dDouble argc) {
        argc.x *= x;
        argc.y *= y;

        return argc.x + argc.y;
    }

    public void print() {
        Debug.Log(x + "," + y);
    }
}

enter the description of the image here

Unity: how to get players to see only one specific player but not others?

Good Morning.
I am developing an educational game that is not multiplayer. However, I would like to add a function that allows the teacher to enter the game and that all students can see it, but no student can see the other students.
Is there a way to do that?
I appreciate your time and guidance.

Tips on Unity hosted content

I am currently trying to create a mobile application that, in order to try to maintain a small size, I would like to have a large part of its content stored online and download it to mobile users when the application requires it.

Ideally, I would like to do it not only as a means to reduce the original size of applications, but also to allow new assets to be introduced over time (such as new objects and textures) without the user having to reinstall the application or download a new update.

I am currently investigating the use of Unitys Addressable Assets for these purposes, and I am currently trying to test and implement this idea on a small scale using assets stored with Google Cloud storage.

However, if possible, I would like to ask if anyone here has any experience with storage and access to assets on an external server, and if so, could they have any advice on whether this could be a viable solution for these purposes? ?

Any help would be greatly appreciated, since this is a completely new area for me.

Thanks in advance.

Exit Unity to the native iOS application

I am working on the iOS application that will include some unit games.
And I investigate an opportunity to exit the Unity game to the native iOS application with the games list.
I know that the Unit provides methods Application.Quit() Y Application.Unload()

I have not tried but I am not sure that Application.Unload() It is the correct way to exit the unit to the native iOS application.

sprites: you cannot select the influence of bone in Unity

In my sprite editor, under the weight menu, the bone influence option appears a bit faded and I cannot select it. Unity also doesn't generate automatic weights around my bones for different sprites in the same image. Is this function only available in the pro version, or is there any other configuration that is causing the problem?

How to package a Unity asset that depends on the recipients?

I am creating a Unity asset that I would like to publish in the Unity store. However, this asset depends on the address package and obviously requires an addressable database that lives in a folder called AddressableAssetsData in the root directory of the Unity project.

If I do not include this in my package, the asset will not work and if I include it, it could conflict with the existing AddressableAssetsData of the user who installs my package.

Is it possible to move AddressableAssetsData to a subfolder of my own package or somehow set it to not conflict with the addressableAssetsData structures of another user in the future? What do you suggest?