C
C#

help

✅ (SOLVED)Help a Beginner

OONW-Uno3/29/2023
i am following CodeMonkeys 11Hr youtube video on coding a game in unity. I have ran into a issue where unity wont even open the project besides in safe mode even though the errors it is telling me needs fixed are from scripts that i haven't touched in a while. im asking for help with how to solve whatever weird issue im having and i just hope my project didnt corrupt over the time i was at work. Thanks in advance.
OONW-Uno3/29/2023
im willing to screen share or take whatever screen caps are needed to fix this so i can continue following along. im just not sure what went wrong
BBuddy3/29/2023
Based on a guess you've probably tried to compile it Check project directory if a bin and/or obj exists and delete them Also go into preferences -> external tools, and click 'regenerate csproj' in Unity editor
OONW-Uno3/29/2023
yes it compiles whenever i go back to unity from VS, i restarted unity and now the safe mode stuff is happening. i will send directory next
OONW-Uno3/29/2023
The only new object that was added was another counter type it all was working until I started working on state machine and any SO scripts no longer allow me to create new SOs i selected visual studio i found the generate .csproj files do i check off every box before regenerating?
OONW-Uno3/29/2023
BBuddy3/29/2023
Only keep the first 2 checked. From top to bottom Embedded packages and local packages Then press regenerate
OONW-Uno3/29/2023
okay nothing changed in unity but it did update in Visual Studio
OONW-Uno3/29/2023
OONW-Uno3/29/2023
i didnt even touch this code at all when i made the new script for the stove counter thats why im so confused why i have the issues now and not when the base counter was implimented
BBuddy3/29/2023
Make sure the filename matches the class name And also make sure you have not compiled it. And remove any assemblies that might have been added. Unity will compile it for you automatically.
OONW-Uno3/29/2023
can i close unity while i skim the code or does it need to stay open? sorry if im asking to much this is the first project im using to learn
BBuddy3/29/2023
Please paste entire script here $paste
MMODiX3/29/2023
If your code is too long, you can post to https://paste.mod.gg/ and copy the link into chat for others to see your shared code!
OONW-Uno3/29/2023
what specific script do you want the stove or the base counter
OONW-Uno3/29/2023
BBuddy3/29/2023
Whichever has the errors BaseCounter It seems
OONW-Uno3/29/2023
i just paste it on the website it opens right both have errors
BBuddy3/29/2023
Paste on site, press save and copy the link in the URL And then paste said link here
OONW-Uno3/29/2023
got ya one sec thanks alot
BBuddy3/29/2023
Oh, I see. You can't have two classes with the same name in the same namespace I can see that you have a BaseCounter in Scripts as well as one in Scripts/Counters
OONW-Uno3/29/2023
BlazeBin - prbaslfojuqy
A tool for sharing your source code with the world!
OONW-Uno3/29/2023
so i accidently duplicated it i guess?
BBuddy3/29/2023
It is possible
OONW-Uno3/29/2023
well deleting the duplicate fixed the 14 or so issues it said base counter had
BBuddy3/29/2023
So all good now?
OONW-Uno3/29/2023
ill try to reopen unity to see if it loads
OONW-Uno3/29/2023
only issues now:
BBuddy3/29/2023
Same thing there Duplicate file
OONW-Uno3/29/2023
ah i see
BBuddy3/29/2023
One in Scripts and one in Scripts/ScriptableObjects
OONW-Uno3/29/2023
fixed that now this
BBuddy3/29/2023
I think you should either learn basics of C# if you do not already know it, or look further on that tutorial. Seems you are doing things that you shouldn't.
OONW-Uno3/29/2023
ill rewatch some parts like i said i had it working fine no issues until the section im at now and its just a road block to me, thanks for your help
BBuddy3/29/2023
Anytime.
OONW-Uno3/29/2023
solved the issues read through found i accidently deleted two breaks after my state changes game now runs as intended
TThinker3/29/2023
(you can close the post by typing /close)

Looking for more? Join the community!

Want results from more Discord servers?
Add your server
Recommended Posts
❔ Exclude items from linq query if they contain one from an array of substringsI've got a list of strings, that if they appear anywhere in a linq query column i want to exclude th✅ Comprehension questions (LeetCode Binary Search)Like the title says it's about this puzzle https://leetcode.com/problems/binary-search/description/ ❔ How to create a cubic function calculator that also calculates the minimum and maximum value```c Console.WriteLine("Please enter a, b, c, d for the cubic function ax^3+bx^2+cx+d"); ❔ how to listen to the output of a virtual audio device on windows using C#?how to listen to the output of a virtual audio device on windows using C# to save the raw audio stre❔ How to wait for process to completei want to make program opens async but instead of giving 'hard coded' delays but i don't know how to❔ Problem with including C DLL in a C# console app project.So I have this C DLL imported into my console app (.NET 5). I simply cannot get to call it correctly✅ Win Form Event Handlers questionHi, I was just wondering if there is an event handler when the win form is idle that I can then run ❔ Problem with Dictionary<ulong, Image> (Strange work of memory access)Concept of my system: A system that draws a picture with stickers, each of the stickers can be moved❔ How do I refactor this?I am working with a grid of tiles, each tile has an int, which is made up of 4 bytes which represent❔ [AvaloniaUI] Visibility of item in ListView based on conditionAn Avalonia UI application is used to manage an evidence of items. It allows the user to add items. ✅ How to structure this login/signup page layoutSo I have this mockup of the layout I want for a login/signup page in my Blazor WASM app. Pretty sta❔ I am need of help before I give up and run my code on a server instead of a serverless solution.I have create an azure function locally and i've used the selenuim webdriver package for taking scre✅ .Net Core 6 Asymmetric Encryption with custom public and private keysHello all! How can i use the `Asymmetric Encryption` in .Net 6 but choosing/importing private and pu❔ No Design in C#Instances of this bug (1) 1. View Call Stack at System.Runtime.InteropServices.Marshal.ThrowExce❔ having issues on a reloading script on unity to reload weaponsthe code is used in a youtube video and i have pretty much copied to to get it to work but it doesnt❔ help with an exerciseI've encountered a weird problem that idk how to fix. Say we've got a string "31131123521" how do i ❔ Accessing HTTP Context at DbCommandInterceptor [.NET 7]Hi! I'm having some issues trying to access the HTTP Context at my DbCommand Interceptor class. What❔ XMLAttributeCollection -> Dictionary with LINQ?It's a confusing class. It only allows turning it into a Queryable, but I have no experience with th❔ MS SQL Reporting Server URL Being RedirectedWe have an application from a vendor that was written in C# and we recently upgraded the MS SQL data❔ dataset memory leakI found memory leak and I don't understand how to fix it Test case: ```cpp public class MemoryLeaksT