RayStudio36 / UnityWithLua

unity with lua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unity With Lua

Unity template project with Lua

Install && Configure

git clone --recursive https://github.com/RayStudio36/UnityWithLua.git your_project_name

cd your_project_name

chmod +x ./configure.sh
./configure.sh

ExampleScene

Open Assets/Scenes/SampleScene

Dependency

Document

Structure info

  • Lua source file: Assets/LuaScripts

  • Entry file: Assets/LuaScripts/main.lua

With ECS framework

If you want to develop with ECS framework, you can use this.

  1. Add submodules

    cd your_unity_project_path
    
    git submodule add https://github.com/RayStudio36/tiny-ecs.git Assets/LuaScripts/libs/tiny-ecs
    git submodule add https://github.com/RayStudio36/ray-ecs.lua.git Assets/LuaScripts/libs/ray-ecs
    
  2. Add require to init.lua

    Add below code into Assets/LuaScripts/init.lua at the end.

    ----------
    ---ECS
    ----------
    _G.TinyECS = require("libs.tiny-ecs.tiny")
    local RayECS = require("libs.ray-ecs.init")
    _G.System = RayECS.System
    _G.Comp = RayECS.Comp
    _G.World = RayECS.World
    _G.Entity = RayECS.Entity
    _G.Global = RayECS.Global

LICENSE

Copyright 2020 RayStudio9236

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

unity with lua

License:MIT License


Languages

Language:C 51.8%Language:C# 46.8%Language:C++ 1.3%Language:Shell 0.1%Language:Lua 0.1%