Skip to content

alvisisme/how-to-use-sqlite3-on-hololens2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to use sqlite3 on Hololens2

本工程主要展示了如何在 HoloLens 2 设备上使用 sqlite3 数据库的方法。

测试环境

  1. Unity 2020.3.48f1
  2. HoloLens 2 ARM64
  3. Target SDK Version 10.0.19041.0
  4. Visual Studio Version 2019

依赖环境

  1. sqlite 3.45.3 源码
  2. sqlite-net v1.9.172 源码

主要步骤

  1. 导入 sqlite3 源码,同时修改源码加入预编译指令SQLITE_OS_WINRT

    /*
    ** Determine if we are dealing with WinRT, which provides only a subset of
    ** the full Win32 API.
    */
    // #if !defined(SQLITE_OS_WINRT)
    // # define SQLITE_OS_WINRT 0
    // #endif
    
    #define SQLITE_OS_WINRT 1

    目前没有找到从 Unity 中控制 C/C++ 源码预编译指令的方法。

  2. 导入支持 IL2CPP 的 sqlite-net 源码 SQLite.cs

    参考 Support source code integration of sqlite3 for Unity IL2CPP

参考引用

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages