Hi everyone! I am a slightly new game dev, so please bear with! So I have been trying to get a typewriter effect in the Unity UI where it would go one letter at a time until I have a word. However I have been getting tons of runtime errors and the public variables in the code haven't been appearing in the inspector. However, as I can manually put my sentence in the code I do not have a problem with the public variables as much. Here is my code:
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class TypeWriterEffect : MonoBehaviour {
public Text dialogueText;
IEnumerator TypeSentence(string sentence)
{
dialogueText.text = "Hello World";
foreach (char letter in sentence.ToCharArray())
{
dialogueText.text += letter;
yield return null;
}
}
}
The console errors are as follows:
> The referenced script (TypeWriterEffect1) on this Behaviour is missing!>> The referenced script on Behaviour (Game Object 'Text') is missing!
And this is the Inspector error
> The associated script can not be loaded.> Please fix any compile errors> and assign a valid script
Thank you for your time! =]
↧
Typewriter Effect UI Errors
↧
Error log with line number but without column number. How to solve it?
Whats happens:
...Scripts/Editor/Enemy2DAIEditor.cs:488)
What i need:
...Scripts/Editor/Enemy2DAIEditor.cs:488,35)
Thank you.
↧
↧
Unity Crash When i click play
Hello!
I built a project with "unity + vuforia", but when I click on "play", unity chash, and the windows closes it.
Please, Help!!!!
↧
I'm having trouble understanding this xcode error,I'm having trouble understanding what this xcode error is referring to
I was building my Unity project to an iPad when I got this assembly error (a bad access exception). I don't know where it's referring to or what it means.
It seems to be in a cpp file called ScriptingBackendApi_Mono.cpp, but I haven't been able to find that file. I don't know where to look so I can diagnose what to fix.
The Unity build is version 5.3.4. It's an older version since it's also meant to run on WebGL. The Xcode version is Beta 9.
![alt text][1]
[1]: /storage/temp/123065-screen-shot-2018-08-17-at-30348-pm.png
↧
having problem connecting to the internet due to some proxy?,unity is not able to connect to the internet due to some proxy issue?
I am having a problem with my computer where I have some proxy problem that I am not able to resolve which is causing some internet apps to not to function properly or not getting internet connection but some apps work (the apps which have an option for direct connect which ignores the proxy). so is there a way to that in unity and if is than what it is.,I have some proxy problems with my computer so a lot of apps don't connect to the internet and some apps that have a direct connect option they seem to work properly (the apps that have an option use no proxy or direct connect). so is there any option in unity to connect to the internet directly.
↧
↧
App has stopped working in Unity 2018.2.4
I use Unity 2018.2.4. When I try to build my project in minimum api 26, everything is fine, but when open the application I got notice "application has stopped working".
This my player setting, what I miss ?
↧
WebGL on Firefox Linux displays InvalidStateError,WebGL on Linux Firefox displays InvalidStateError
I have found an issue with 2018.2.4 where running a webgl build on firefox and linux, where the following error message appears:
"An error occurred running the Unity content on this page. See your browser JavaScript console for more info. The error was: InvalidStateError"
The web console does not contain any additional information, even with development builds. This occurs on Firefox ESR (52.4.0) on a linux machine with 100% consistency. I'm hosting the build on S3. This occurs both with our project build and also an empty project. On other OS/browser combinations this error does not occur - unfortunately, all our players are on this firefox/linux combo. We are currently on Unity 2017.1 where this issue does not occur, but are eager to finally upgrade to a newer version of Unity.
After dismissing the error prompt, Unity is able to load and play fine. The game works - I just don't want to confront our players with this error message.
I have tried:
- Building with linker set to asm.js and both (webassembly isn't supported on Firefox 52 ESR)
- Building with .NET 3.5 and 4.X equivalent in case that could cause this issue
- Searching google and unity answers for this and similar issues. I haven't found much that seems relevant to my situation
- Rebooting our test hardware and confirming that firefox caches have been cleared
I have also submitted a bug report for this issue. Case 1073101
Any thoughts or suggestions on how to resolve this issue would be welcome. I am continuing to investigate on my own, but would welcome some assistance.
Thanks,
Jarrod
↧
Unity editor doesn't open project window
Hi, I try to create my first Unity proect, but the Unity Editor doesn't opent the project window after I created it. I get just a header. I use virtualbox on Linux Mint, the guest OS is Win 7. The Virtual OS has more than 4 GB RAM, and 256 MB for graphical memory. 2D and 3D speed are on.
![alt text][1]
[1]: /storage/temp/123170-nevtelen.jpg
↧
Please Help
errors after updating to latest version
![alt text][1]
[1]: /storage/temp/123241-error.png
↧
↧
i need help with my procedurally generated terrain script - code in desc,I keep getting this error - local functions are not available in c#4- i pasted the code below
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TerrainGenerator : MonoBehaviour
{
public int depth = 20;
public int width = 256;
public int height = 256;
public float scale = 20f;
public float offsetX = 100f;
public float offsetY = 100f;
void Start()
{
offsetX = Random.Range(0f, 9999f);
offsetY = Random.Range(0f, 9999f);
{
Terrain terrain = GetComponent();
terrain.terrainData = GenerateTerrain(terrain.terrainData);
}
TerrainData GenerateTerrain(TerrainData terrainData)
{
terrainData.heightmapResolution = width + 1;
terrainData.size = new Vector3(width, depth, height);
terrainData.SetHeights(0, 0, GenerateHeight());
return terrainData;
}
float[,] GenerateHeights()
{
float[,] heights = new float[width, height];
for (int x = 0; x < width; x++)
{
for (int y = 0; y < height; y++)
{
heights[x, y] = CalculateHeight(x, y);
}
}
return heights;
}
float CalculateHeight(int x, int y)
{
float xCoord = (float)x / width * scale + offsetX;
float yCoord = (float)y / height * scale + offsetY;
return Mathf.PerlinNoise(xCoord, yCoord);
}
}
}
,using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TerrainGenerator : MonoBehaviour
{
public int depth = 20;
public int width = 256;
public int height = 256;
public float scale = 20f;
public float offsetX = 100f;
public float offsetY = 100f;
void Start()
{
offsetX = Random.Range(0f, 9999f);
offsetY = Random.Range(0f, 9999f);
{
Terrain terrain = GetComponent();
terrain.terrainData = GenerateTerrain(terrain.terrainData);
}
TerrainData GenerateTerrain(TerrainData terrainData)
{
terrainData.heightmapResolution = width + 1;
terrainData.size = new Vector3(width, depth, height);
terrainData.SetHeights(0, 0, GenerateHeight());
return terrainData;
}
float[,] GenerateHeights()
{
float[,] heights = new float[width, height];
for (int x = 0; x < width; x++)
{
for (int y = 0; y < height; y++)
{
heights[x, y] = CalculateHeight(x, y);
}
}
return heights;
}
float CalculateHeight(int x, int y)
{
float xCoord = (float)x / width * scale + offsetX;
float yCoord = (float)y / height * scale + offsetY;
return Mathf.PerlinNoise(xCoord, yCoord);
}
}
}
I am trying to make procederaly generated terrain
↧
Blue 'Play' button doesn't show up after I click the 'Play' Button
![alt text][1]
[1]: /storage/temp/123388-00000.png
As the photo shows. Even there's nothing in my project, errors occur and can I can't stop the game. How can I solve it? I have re-downloaded once to twice but it doesn't help.
↧
multiple library folders - help!
Hi there,
I was trying to copy-paste my project from one folder to another when something happened. Now when I open the project (from Unity) I get:
Fatal error!
detected multiple library folders within your project"
Did you copy a project into this project? Use "Export Package" to move assets between projects.
You need to remove the following Library folder(s) from your project before you can open it again:
c:/users/documents/myproject/assets/library
When I delete the library folder and open my project directly from Unity it works perfectly fine. BUT, when I try to open it from explorer, it recreates an entire brand new "Library" folder (the one that I have to delete in order to access the project) and all the assets disappears and the project doesn't run. So, my project works only if I start it from unity and just if the library folder is deleted. I have to share this project with another pc, how can I do that? please help me, I'm a step away from a nervous breakdown.
↧
Build APK error, Im using java 9,
CommandInvokationFailure: Failed to build apk.
C:\Program Files\Java\jdk-9.0.1\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:/Users/asus/AppData/Local/Android/Sdk\tools" -Dfile.encoding=UTF8 -jar "D:\unit\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -,
↧
↧
Is Unity 2018.1.5f1 compatible with .NET Standard?
I have a custom dll which I've dragged in to the Assets folder of my Unity project which targets .NET Standard v2.0.3. When I attempt to build in unity I get a number of missing reference errors (see one below). System.Net.Http is in the MonoBleedingEdge folder and if I attach a VS debugger to Unity and click the Play button in Unity, the code runs and I am able to make a network request to my web API.
Can someone please assist how to get unity to grab the correct dll during the build process?
Note, The .csproj files in my project folder all appear to reference the correct path. Thank you!
error CS0012: The type 'HttpClient' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
↧
My map turns blue red and green always!
My map is always blue, red and green all over it, I thought it was for lack of BAKE, but even if it is done, when I change the graphic quality of the game, this error returns, I tried to build the project to see if the error was only in ENGINE but even with the project copilado the error continues, and I have already made the bake more than six times.
What can it be?
This happens in all projects that I create or open.
This error apparently started after the higher 2017.5 version.
I have reinstalled the 2017.4.x version but many other script errors and materials appear ...
Image Link:
https://image.ibb.co/dEcCdU/Screenshot_2.png
![alt text][1]
[1]: https://ibb.co/bJtkyU
↧
Save file into unity's project,but doesn't see it in unity software window
Save texture file into unity's project,but it doesn't see it in unity software window.And it doesn't have meta file.Just close the unity and reopen it can see the texture. if you edit the texture in ps and turn back to unity ,it also cannot see the change.and close the unity and open it again.The same issue with Model file....I'm crazy now
↧
NullReferenceException yet Debug.Log shows nothing is null?
I'm getting a Null Reference Exception on a snippet of code, yet I can't for the life of me figure out why the variable would be null. Here's the problematic function:
public void Damage (HEntity.EntityDamage v)
{
v.amount *= data.damageMod;
v.isCritical = data.isCritical;
v.hitboxCritical = data.criticalMul;
if (entity)
entity.Damage(v);
}
The NullReference error happens on v.amount *= data.damageMod.
I've already changed data.damageMod to 2.0f just to be sure it was v that was causing the issue. The error still happened, so it must be a problem with v.
This is how the v gets created and passed in (in a different script):
HEntity.EntityDamage damage = new HEntity.EntityDamage();
damage.amount = stats.baseDamage;
damage.weaponIgnoreCritical = !stats.hasHeadshot;
damage.criticalMul = stats.headshotMul;
col.Damage(damage);
HEntity.EntityDamage is both public and has the System.Serializable attribute.
When I comment out the line v.amount *= data.damageMod, the error shifts to v.isCritical. This leads me to believe the problem lies with v itself and not any fields contained, unless both fields are null. However, that isn't the case. I ran:
Debug.Log(v == null);
Within the problematic function and it returned false. I also ran:
Debug.Log(v.amount == null);
And it returned false. I also checked:
Debug.Log(v.amount);
And it printed the expected value of 30 for the test case I was running.
All fields in HEntity.EntityDamage have default values in the definition, and v.amount is clearly being set by the other script. Is there some reason why my current script can't write data from a class that was created somewhere else? This problem didn't happen in UnityScript, and I don't see why that would happen here.
I've even gone as far as to try:
v.amount = new float();
v.amount = 20.0f;
Upon creation of the class that still didn't work. Any idea what could be wrong?
Thanks in advance!
↧
↧
Assets/thebullet.cs(7,27): error CS0501: `thebullet.LookRotation(Vector3, Vector3)' must have a body because it is not marked abstract, extern, or partial
I am making a 2d top down shooter and I got this code from a tutorial, and it did not work, what should I do?
the code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class thebullet : MonoBehaviour {
public static Quaternion LookRotation(Vector3 forward, Vector3 upwards = Vector3.up);
public GameObject bullet;
void Update () {
Vector3 mousePositionVector3 = new Vector3 (Input.mousePosition.x, Input.mousePosition.y, 1);
mousePositionVector3 = Camera.main.ScreenToWorldPoint (mousePositionVector3);
Vector3 targetdir = mousePositionVector3 - transform.position;
transform.rotation = Quaternion.LookRotation (Vector3.forward, targetdir);
if (Input.GetMouseButtonDown (0)) {
GameObject newBullet = Instantiate (bullet, transform.position, transform.rotation) as GameObject;
Rigidbody rigid = newBullet.GetComponent ();
rigid.velocity = transform.up * 10;
}
}
}
↧
Blank screen in unity when launching with graphics card,Unity gives many errors when using it with my Nvidia GTX 1050
Here is the log for you to see. Whenever I launch with the integrated graphics, everything seems to work fine. However, when I launch it using my nvidia graphics card, the screen is blank and I can only see the console.
0x0000000141536528 (Unity) StackWalker::GetCurrentCallstack
0x000000014153CA66 (Unity) StackWalker::ShowCallstack
0x000000014140BE2B (Unity) GetStacktrace
0x00000001408AEB60 (Unity) DebugStringToFile
0x0000000142199751 (Unity) D3D11Window::EndRendering
0x000000014220DEC8 (Unity) GfxDeviceWorker::RunCommand
0x000000014220F5BB (Unity) GfxDeviceWorker::RunExt
0x000000014220F6F4 (Unity) GfxDeviceWorker::RunGfxDeviceWorker
0x0000000140A83E38 (Unity) Thread::RunThreadWrapper
0x00007FFC5CFF3034 (KERNEL32) BaseThreadInitThunk
0x00007FFC5D771431 (ntdll) RtlUserThreadStart,So it seems that I keep getting errors when launching Unity with my 1050 card. Whenever I launch it with the integrated graphics, however, everything seems to work just fine. Is there any way that I could get some help with this??
Here is the entire error log from the console.
0x0000000141536528 (Unity) StackWalker::GetCurrentCallstack
0x000000014153CA66 (Unity) StackWalker::ShowCallstack
0x000000014140BE2B (Unity) GetStacktrace
0x00000001408AEB60 (Unity) DebugStringToFile
0x0000000142199751 (Unity) D3D11Window::EndRendering
0x000000014220DEC8 (Unity) GfxDeviceWorker::RunCommand
0x000000014220F5BB (Unity) GfxDeviceWorker::RunExt
0x000000014220F6F4 (Unity) GfxDeviceWorker::RunGfxDeviceWorker
0x0000000140A83E38 (Unity) Thread::RunThreadWrapper
0x00007FFC5CFF3034 (KERNEL32) BaseThreadInitThunk
0x00007FFC5D771431 (ntdll) RtlUserThreadStart
↧
UI buttons are invisible but clickable when built
I have the same problem but mine lets me build the game for mobile but it will randomly make certain UI elements invisible but still clickable where they are supposed to be Some of my buttons that are placed in a Canvas set to World Space don't show up but they are still clickable and intractable.I know their position is anchored well they are just not being rendered. They are all also set to UI layer and the camera is set to render UI. However, some objects show up and some don't. I didn't really change anything before building the game to test on iOS. Because it used to work just fine until it decided to act this way. To illustrate my problem, I have uploaded a video on youtube to show how it's all fine in the editor but once built, some of the UI objects disappear but still clickable and intractable! You will notice how when the sprite that was set to show when a button is pressed, is shown when I click the invisible button but then disappears as I let go of the button. UPDATE: I noticed I keep getting this error which I think ought to be the main issue: Error: Could not extract GUID in text file Assets/Scenes/AlchemistHouse.unity at line 28923.
Unfortunately, it's not just that line its 88 more lines right below it ! so 89 GUID aren't being extracted ?!!
Youtube link here: https://www.youtube.com/watch?v=QWPXYijXtsc
Problem randomly started happening after 2018.1+
↧