c#

Can I access prefab objects? (Unity3D)

I have a prefab: I need to refer to the Terrain ("0000") lying in this prefab. To work with Terrain ("0000") in "Prefab Fo ... b in the code and immediately execute the code that draws the road. And as a result, when opening, we see the changed prefab.

how to change the direction of movement of an object when it collides with something Unity 2D

I was able to register the movement of the ball using System.Collections; using System.Collections.Generic; using UnityEngi ... } But there must be something else in the if body that changes the movement only along y, and what is does not work

Help with spawning and deleting objects on Unity3D!

I want to create a game using Unity3D like a dinosaur from Google chrome only in 3d, the player's movement and jumps I did, b ... nd there was no such problem that objects do not have time to appear and the player falls into the void, I can not implement.

What is the difference between Func<> and delegate?

Both options are used for the purpose of returning a value, both can take multiple parameters. What is the difference between them?

DataGridView, data binding

There is a certain e-t DataGridView in which columns are created in manual mode, it is done something like this: dataGridView ... e DataGridView as follows: dataGridView.Rows.Add("Значение для ячейки 1", "Значение для ячейки 2", "Значение для ячейки 3");

Generating a sequence of unique random numbers

I need to generate a sequence of unique random numbers. I use a standard generator and get repetitions, and quite often, for ... (); for (var i = 0; i < 20; i++) { Console.Write(rand.Next()); Console.Write(' '); } 1 3 3 2 0 9 5 8 2 4 9 ...

Divide and Conquer: counting the number of inversions in an array

There is a function for counting inversions in an array that requires O (n2) time: static void Inverses(int[] A, ref int ... ve a hard time understanding recursion, when the first method calls the other method, and the other calls the first provided.

Unity crashes when I press Run

The problem is that I can't run the Unity project, because when I click the Run button, I get a crash and a "Report error"not ... tion of the error? Because as I said, as soon as I click on Run, Unity immediately closes and only the message on the screen

The Vigener cipher

Hello, there is a problem with the implementation of the Vigener cipher. It is not possible to access the table elements and ... xt.Substring(j, 1)% txbx_key.Text.Length); rez += tmp; } } } }

Dynamic array of C objects#

There is a class (public class myNum). How do I declare and then initialize a two-dimensional dynamic array with objects of m ... blic MyNum[,] Array1; public MyNum[][] Array1; I don't understand it, and it's not written anywhere about it. As usual!!!

Getting the source code of a program in C#

There is a program, presumably in C#. How do I view its source code?

Cut off milliseconds from TimeSpan

Good day, Hashcode. I have an application in which a simple media player is implemented using the WPF MediaElement. There is ... re-I don't know. PS. As you can see from the code, there is a combination of WPF and WinForms, please do not swear at this :)

How do I set a character or the end of a string in a regular expression?

The input is supplied with strings of the form asdfsadfs=dfasfsdfd; sdfasdf dfsdff=sdfsdf; dsfasdfsdf=sdfsdf How to extract ... Match(z, @"\=(.*?)[;$]").Groups[1].Value; The " $ " sign inside a character class is not interpreted as the end of a string.

Uploading an AssetBundle from a hosting in Unity

You need to download the AssetBundle from the hosting. I wrote the following code to download from the server: stri ... m fell out to enter your username and password. The next time this form was no longer there, the file was immediately swung.

Programmatically creating 2d objects in unity

I decided to study unity. I am currently making a clone of Ball Blast, and I have the following problem. The problem is that ... and rigidbody 2d. It turns out I have to create these balls from the script. So, I do not know how to do it. Please help me.

Cannot implicitly convert type "(int, int) " to " int " C#

I started learning C# a couple of days ago and ran into this problem. public static int[] Score(bool check, int player, int p ... re; } But this method also didn't want to work (Не удается неявно преобразовать тип "int[*,*]" в "int[]"). What should I do?

Repository pattern and ORM change

I know that there were many similar questions, but unfortunately I could not find the answer to them for myself. Probably I w ... ltiple tables? I want to clarify that I am asking this question in the framework of the Repository pattern and not the DAO.

How to log in to Instagram.com?

I just started learning C#, theory is very boring without practice, so I decided to tinker and write an application for some ... s and simulate pressing a button. But here's how to implement it nowhere found. If someone has encountered this, please help.

algorithm for finding all paths between two vertices without repetitions in the digraph

Please help me make an algorithm for finding all paths between two vertices (vertices should not be repeated in paths), prefe ... alue; func += FindDirectWays(graph, vertex.Vertex, Y); } } return func; }

How to plot an array graph?

Hello. There is a one-dimensional array. I sorted it, calculated the arithmetic mean, found out the minimum and maximum value ... appropriate comments. Please help me understand the task, that is, to understand how in this way, you need to build a graph.