https://github.com/vandercat/nekolib
micro-Unity
https://github.com/vandercat/nekolib
Last synced: 9 months ago
JSON representation
micro-Unity
- Host: GitHub
- URL: https://github.com/vandercat/nekolib
- Owner: VanderCat
- License: zlib
- Created: 2024-02-02T16:38:28.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-30T16:02:46.000Z (12 months ago)
- Last Synced: 2025-04-03T21:47:33.490Z (10 months ago)
- Language: C#
- Size: 117 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
- License: LICENSE.MD
Awesome Lists containing this project
README
# NekoLib
[](https://www.nuget.org/packages/VanderCat.NekoLib)
[](https://www.nuget.org/packages/VanderCat.NekoLib.Console)
[](https://www.nuget.org/packages/VanderCat.NekoLib.Extra)
[](https://www.nuget.org/packages/VanderCat.NekoLib.Filesystem)
[](https://www.nuget.org/packages/VanderCat.NekoLib.Tools)
A collection of library agnostic gamedev-like stuff
> [!WARNING]
> Beware of bugs: everything's made for personal use, and may be undocumented
## Features
1. Unity like GameObjects + Components
2. Scene Management (implement serializing/etc. yourself)
just implement `IScene` and you created a scene! Next you can load it by using `SceneManagement.LoadScene(new Scene)`
3. Transform and Object graph
4. Extendable Virtual Filesystem (NekoLib.Filesystem)
5. ImGui Unity-Like in-game editor (NekoLib.Tools)
6. Source-like console system (NekoLib.Console)
7. Extra stuff like AttachMode, HotReloadService, Damping, base Scene implementation (NekoLib.Extra)
## Example:
```csharp
using NekoLib.Core;
using NekiLib.Scenes;
class Scene : IScene {
public string Name => "Name"
public bool DestroyOnLoad { get; set; } = true;
public int Index { get; set; }
private List _gameObjects;
public List GameObjects => _gameObjects;
public void Initialize() {
var gameObject = new GameObject();
gameObject.AddComponent();
// Do stuff before first frame
}
public void Update() {
// Do stuff every frame
}
public void Draw() {
// Draw stuff on frame
}
}
class TestComponent : Behaviour {
void Awake() {
Console.WriteLine("Just like in Unity!")
}
}
static class Program {
public static void Main() {
var scene = new Scene();
SceneManagement.LoadScene(scene);
while (true) {
SceneManagement.Update();
SceneManagement.Draw();
}
}
}
```