• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

12133 Excellent


About Nypyren

  • Rank

Personal Information

  • Interests
  1. Option 1: Assign the reference in the inspector: Check this tutorial out where he makes a public GameObject field in his C# code, and then in the inspector, drags an object into the slot. https://unity3d.com/learn/tutorials/topics/scripting/how-communicate-between-scripts-and-gameobjects The first 2-6 minutes or so should demonstrate what I mean. This kind of reference will work even if the GameObject is inactive. Basically, if you follow the same steps, you would make your TextHolder public, edit the scene or prefab(s) so that the TextHolder reference is assigned in the scene or prefab instead of using GameObject.Find at all. When the scene or prefab is loaded, Unity will automatically assign the variable to the one you drag-and-dropped in the editor. Option 2 is: If you instantiate a prefab by using AssetBundle.LoadAsset, AssetDatabase.LoadAsset, Resources.Load, etc. followed by Object.Instantiate, immediately after you instantiate it, you can assign its public member variables. If your program is well-designed, the point at which you instantiate a prefab will be a point at which you already have the references available that you want to assign to those fields. Unfortunately, Unity does not yet let us initialize things using C# constructors. That would be Option 3, if it becomes available in the future.
  2. TextHolder is the only thing that can be null on that line. The GameObject wasn't found. "This function only returns active GameObjects." -- Documentation Make sure the game object is in the scene (not the project) and it's active. You should also make sure there aren't any "invisible" parts of the game object's name, such as leading or trailing spaces. Eventually, you should think about avoiding searching for objects by name, and directly reference them by setting up those references in the scenes, prefabs, and prefab instantiation scripts. This will increase the program's maintainability and efficiency.
  3. How to Learn English? I have my doubts.

    Regarding the "IPA": The IPA is meant to be an alphabet which represents the spoken representation (the sounds) of a word. If you learn the sounds that IPA represents, you can use it to (mostly) say the word without hearing it first. But most native English speakers learn how to pronounce words by hearing other people talking, and associating those sounds with the written form of the words. Certain patterns in the words tend to make the same sounds even without having to check the IPA (with exceptions), so a person who sees a new word can usually get close enough to the correct pronunciation (and then someone will tell you how it's actually pronounced later, if you accidentally use it wrong). You could try learning word pronunciation from IPA, but it might be easier to learn from movies or television shows, if you listen to English audio at the same time as having subtitles or closed-captions on for English as well. Grammar is similar: Native speakers learn by listening to other people, learning most of the grammar patterns on their own, then being told what is correct or incorrect by other people. I've been trying to learn Japanese in my free time, but I'm pretty much in the same situation as you: I'm not really sure what I should do to get better at it aside from just repetition, reading, and listening.
  4. C# Peek through door

    No thanks, I've got my hands too full to help much more than this. I take breaks on the forum occasionally though. Good luck on your project!
  5. C# Peek through door

    OK. For the first part, where the door turns transparent, it looks like what the game does is: If you're in a room, turn the near wall and door transparent. It looks like there is an animation for the wall which hides/reveals it. This feels to me like it's being scripted by detecting which room the player is in, and telling the wall(s) and door(s) to change state when you change rooms. For the second part, where the character appears as a blue ghost when they're behind a solid object, I believe that's done with a shader and some rendering tricks. You'll also notice a few places where the character is behind other objects where it happens as well, so I believe this effect is always active even if you're not going through a door. Unfortunately I don't know enough about shaders to tell you what to do or what search terms to use to find someone who does. Maybe it works by simply turning off z-test, drawing the character last, and if any previously drawn pixel has a nearer depth, draw a blue pixel instead?
  6. C# Peek through door

    Ok, I misunderstood. I thought you meant the character was looking through a door without moving into the room on the other side. Every time the player in that video goes uses a door, he goes into the next room. I don't know how the game controls work, so I don't know if it's automatically doing that, or if the player is. Does the game also let you do something else? What I saw in the video was camera-related techniques used for third-person games: When you move through a door which is parallel to the screen, the door turns transparent so that the third-person camera can see the player character. When you move through a door which is perpendicular to the screen, your can see a blue ghost of your character as the camera pans through the wall. Are those what you mean by peeking? Or did I miss something in the video?
  7. C# Peek through door

    Okay, is there something specific you're having trouble with?
  8. C# Peek through door

    Normally with a door, you'll either move the collider with the moving part of the door, or just disable the collider at a specific point. You can use an animation to open the door or use physics and apply force or torque to open it. With the door that you only want the user to peek through, you'll probably want to use an animation to control the door. Don't do anything with the collider; just move the rendered mesh so that you can actually see through/around it. Put the player into a state where they can only perform actions you want them to, or cancel peeking. I can't quite tell from your posts, but just in case you haven't done any scripting in Unity yet, it would be best to start by reading/watching all of the online tutorials that are available first.
  9. C# Peek through door

    Have you created normal doors already?
  10. C# Peek through door

    Are you modding the game or recreating something using an existing engine that you're not totally familiar with yet? We'll need to know what exactly you're dealing with to offer more detailed suggestions.
  11. List with nouns, adjective and verbs?

    Verbs are a lot harder to deal with. In some cases, there are different verbs which are sort of the same thing, but are different depending on the noun being acted on: For "lawn": (intransitive) a lawn can {grow, dry out, die}. You can (transitive) {mow, water, seed} a lawn. For "hair": (intransitive) hair can {grow, recede, fall out}. You can (transitive) {cut, wash} hair. After figuring out which verb(s) are compatible, you still need to conjugate the verb: subject-verb agreement: "I water the lawn" "He waters the lawn" "The owls watch me" "The owl watches me". tenses: "I have watered the lawn" "I will water the lawn" This can be extremely complicated since there are different types of verbs which behave differently, as well as modal and auxiliary verbs which change the rules. "The cans can hold water" "The can can hold water" // the "can" between the noun and verb here... "The cans hold water" "The can holds water" // ...means you don't use "holds" like in this case.
  12. List with nouns, adjective and verbs?

    Luckily adjectives in English are fairly simple compared to the rest of the language. I think that making a material-to-adjective lookup table should work. In some cases the adjective has the same spelling as the noun. To expand your example to make sure I understand what you mean: Wood (noun) -> Wooden (adjective) Iron -> Iron (there is no separate adjective spelling like "ironen") Gold -> Golden Lead -> Lead ("leaden" was used to describe the material long ago, but now it primarily means "dull, heavy, slow, or lead colored") Plastic -> Plastic I'm trying to think of cases where "{material adjective} {item noun}" wouldn't work, but I can't think of any cases right now. In English, the only complex rules I remember for adjectives is that when multiple adjectives are attached to one noun, we write them in a specific order, based on their category. We would put size before color: "big red dog", instead of "red big dog". https://dictionary.cambridge.org/grammar/british-grammar/about-adjectives-and-adverbs/adjectives-order
  13. I think it changes it for your local user settings, so the change won't affect other people on the team. That could be good or bad depending on whether you want everyone to use the whole verbose-logging process or if you plan to distribute the resulting log after you capture it.
  14. If your normal build process in Visual Studio invokes MSBuild (by default it should), then look in the options for the output verbosity (Tools/Options/Projects and Solutions/Build and Run/MSBuild project build output verbosity) and crank it all the way up (Diagnostic). Then do whatever you normally do which invokes the custom tool and see if the command line options for the tool show up in the build output window. In VS2017 I also see an option to do that for a build log file. You could potentially write a command line tool which parses the log file, then run that tool for your 'when a user presses a key' case. I've only used this for UWP packaging automation, but it might work in your case as well.
  15. RE: 4Chan: No, his posting style is nothing like that. He would also be ripped to utter shreds if he posted there. It is not a friendly place you go to try to get people to agree with you. RE: Unified game vision: I basically agree with Dramolion. Let me put what I think in my own words as well though: If one guy has a vision that everyone agrees with, that can work. It may be difficult for his vision to be distributed to everyone else efficiently, though, and he can become a bottleneck if there is too much feedback. If there are a group of people who cooperate on a vision and then split up the work of coordinating that with the rest of the team, that can distribute the load better and be more efficient as a result. I personally have the most experience with this method and have seen it succeed more often than not, so I currently prefer it. If people have conflicting, strong opinions which are not resolved quickly, I've seen the process break down every time. If nobody on the team has a good vision, the project also tends to fail. If I had to chart it, there would be several dimensions in play: Who wants to contribute their vision? Can the vision be clearly communicated in an effective manner? How much do they want to contribute? How much conviction does a person have in that vision? How accepting is a person of other people's feedback or alternate ideas? There are many possible ways for things to succeed, but also many possible ways for it to break down, or even in some cases, catastrophically fail. In part, this is an aspect of team organization. Larger teams are harder to organize effectively, and this may be true for the vision aspect as well. Smaller teams can often be more efficient, and I could see this being true with unifying vision, since with fewer people there are fewer conflicting opinions.
  • Advertisement